External FLASH memory to store all the code.
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Answer:
Please replace the following similar code snippet in frameworks with this one, only if you are using external memory for code boot up (EA=1). This will ensure that your descriptor table is located into internal memory properly. Previously the descriptors were nabbed from xdata space and NOT code space.
IntDescrAddr = INTERNAL_DSCR_ADDR;
ExtDescrAddr = (WORD)&DeviceDscr;
DevDescrLen = (WORD)&UserDscr - (WORD)&DeviceDscr + 2;
for (i = 0; i < DevDescrLen; i++)
*((BYTE xdata *)IntDescrAddr+i) = 0xCD;
for (i = 0; i < DevDescrLen; i++)
*((BYTE xdata *)IntDescrAddr+i) = *((BYTE code *)ExtDescrAddr+i);
pDeviceDscr = IntDescrAddr;
offset = (WORD)&DeviceDscr - INTERNAL_DSCR_ADDR;
pConfigDscr -= offset;
pHIDDscr -= offset;
pReportDscr -= offset;
pStringDscr -= offset;
-
This widget could not be displayed.Anonymous