??? 09/02/05 07:30 Read: times |
#100432 - variables used in my remote update Responding to: ???'s previous message |
My remote update routine.
// --- Local(static) Variables --- typedef struct { unsigned char ucData[PAGE_SIZE]; //128 } tPageSize; typedef struct { tPageSize Page[MAX_PAGES]; //32 } tPageFormat; tPageFormat code tNewFirmware _at_ LOCATION_NEWFIRMWARE; //0x3800 tPageSize xdata tFirmwareData; unsigned int xdata g_uiPageAddress; static unsigned char xdata g_ucDataCount; static unsigned char xdata g_ucPageCount; static unsigned char xdata g_ucPageTotal; static unsigned char xdata g_ucCheckSum; unsigned char UPG_ProcessEvent(unsigned char ucData, unsigned char ucState) { unsigned int uiTemp; // To remove the dependency on library Switch (ucState) { case 0: // Init Remote update ... ... ... break; case 1: // Receive data ... ... ... // if last page, return TRUE break; case 2: // Start updating ... ... ... // Use Watchdog for Software Reset WDTRST = 0x1E; WDTRST = 0xE1; while (1); break; } return FALSE; } Any ideas why my hex code at 0x3800 is so dependent on other modules variables? Thanks. |
Topic | Author | Date |
Strange problem IAP for whole chip | 01/01/70 00:00 | |
Questions please | 01/01/70 00:00 | |
Nobody knows? | 01/01/70 00:00 | |
why | 01/01/70 00:00 | |
For IAP? | 01/01/70 00:00 | |
Which is exactly what FlashMagic is inte | 01/01/70 00:00 | |
and now we know why | 01/01/70 00:00 | |
Get a PC | 01/01/70 00:00 | |
Enclose PCB in a box | 01/01/70 00:00 | |
I understand | 01/01/70 00:00 | |
Process make sense | 01/01/70 00:00 | |
Thank god for the response | 01/01/70 00:00 | |
Maybe the libraries in causing it ??? | 01/01/70 00:00 | |
the problem with absolutes | 01/01/70 00:00 | |
AT89C51RC2 with 128 bytes per page | 01/01/70 00:00 | |
there is no such thing as a byte write, | 01/01/70 00:00 | |
byte write | 01/01/70 00:00 | |
No byte write | 01/01/70 00:00 | |
what was the problem? | 01/01/70 00:00 | |
Problem was ... | 01/01/70 00:00 | |
OK, now face problems in Variables | 01/01/70 00:00 | |
variables used in my remote update | 01/01/70 00:00 | |
Ok, Solved | 01/01/70 00:00 | |
Try this![]() | 01/01/70 00:00 |