This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Dear champs,
I ask this for our customer.
Q1. Is the physical distribution of C2000's Flash as shown in the figure below?
If Q1 is correct,
Q2. The Flash of the C2000 series does not support byte access and can only access (Read/Write) one Word at a time? So, Flash cannot be accessed at odd addresses?
Q3. In the Linker file, the length of the section I defined actually occupies twice the space as defined?
As shown in the figure below, the linker file, HEADERINFO, has a length of 0x100. Is this in word units? That is to say, "The length of the HEADERINFO segment is 0x100 Word, that is, 256 words, 512 Byte?"
Thanks!
Best Regards,
Julia
Hello Julia,
For F28x devices, the CPU uses 16-bit addressing. This means that every address unit (e.g. 0x80000, 0x80001) refers to 16 bits of memory (or a "word"). Additionally, the architecture is little-endian, so a 32-bit word in memory would have the lower 16 bits addressed first (0x0), and then the upper 16 bits next (0x1).
The Flash memory architecture has 128 bits for every Flash word, plus 16 bits of error correction code (ECC). So, each Flash word consists of 8 CPU-addressable words. The first three words of an erased Flash bank would look more like:
0x7 | 0x6 | 0x5 | 0x4 | 0x3 | 0x2 | 0x1 | 0x0 | |
0x08_0000 | FFFF | FFFF | FFFF | FFFF | FFFF | FFFF | FFFF | FFFF |
0x08_0008 | FFFF | FFFF | FFFF | FFFF | FFFF | FFFF | FFFF | FFFF |
0x08_0010 | FFFF | FFFF | FFFF | FFFF | FFFF | FFFF | FFFF | FFFF |
To answer your other questions:
- The CPU can address/access individual 16-bit words in the Flash. However, because a Flash word is 128 bits, all 128 bits must be fetched from Flash at once. The particular requested word is returned to the CPU over the bus. The Flash has a code prefetch mechanism and data cache to maximize performance here, so it is important to enable these modes before the application starts to access Flash memory. The other practical implication of this is that program code stored in Flash needs to be aligned to 128-bit address boundaries using the ALIGN(8) directive in the linker command file. You will see this in our provided flash linker command files inside C2000Ware.
- A size of 0x100 refers to 256 C28x CPU words, which are 16 bits (two bytes) each. So yes, the length is actually 512 bytes.
Best regards,
Ibukun