The error 7 is for INVALID_SECTOR
----- Message d'origine ----
De : lpc.lover <lpc.lover@...>
À : lpc2000@yahoogroups.com
Envoyé le : Jeudi, 1 Juin 2006, 11h49mn 38s
Objet : [lpc2000] IAP erase
Hi all.
I write this code for erase flash of a LPC2106.
This code is base on some code I found on Internet.
I when to know what is a SectorStar? that resembles to?
Flash sector prepare give me a result of 7. What that mean?
Thank.
int EraseSectors(unsigned int SectorStart, unsigned int SectorEnd,
unsigned long ProcFrequency)
{
unsigned long command[5];
unsigned long result[2];
IAP iap_entry = (IAP) IAP_LOCATION;
__disable_interrupt();
command[0] = FLASH_PREPARE_SECTOR_TO_WRITE;
command[1] = SectorStart;
command[2] = SectorEnd;
command[3] = ProcFrequency;
iap_entry(command, result);
// result[0] always give me 7!!! I don't know what is this error.
if (CMD_SUCCESS == *result) {
command[0] = FLASH_ERASE_SECTORS;
iap_entry(command, result);
}
__enable_interrupt();
return (CMD_SUCCESS == *result);
}
SPONSORED LINKS
Microcontrollers Microprocessor Intel microprocessors
YAHOO! GROUPS LINKS
Visit your group "lpc2000" on the web.
To unsubscribe from this group, send an email to:
lpc2000-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]Message
Re : [lpc2000] IAP erase
2006-06-01 by Xedius Zolva
Attachments
- No local attachments were found for this message.