In this thread i am going to explain about relation between start address and number of bytes that can be programmed in Flash API Programming.
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.
In this thread i am going to explain about relation between start address and number of bytes that can be programmed in Flash API Programming.
Hi Everyone,
If we refer the below highlighted lines from F021 Flash API manual:
*F021 Flash API Reference Guide (v2.01.00) (Rev. H) (ti.com)
This means, the starting address plus number of bytes we are trying to write should not exceed the bank data width.
For example, consider RM46L852 device, it has16 bytes of bank data width:
As you can see the programming width it is 144bits, in this 128bits are data and 16 bits are ECC. So, the bank data width will be of 16 bytes (128/8).
So that means the possible data writing will be as below:
Example:
I am trying to write 8 bytes at different address like 0xF0200000, 0xF0200014, 0xF0200028, 0xF020003C and 0xF0200040.
1. 8 bytes writing at 0xF0200000:
This address can be written as 16*N (16*0xF020000), So according to previous given table at this address we can write 16 bytes. And here we are writing 8 bytes only so there won't be any issue in writing.
2. 8 bytes writing at 0xF0200014
This address can be written as 16*N+4 (16*0xF020001+4), So according to previous given table at this address we can write 12 bytes. And here we are writing 8 bytes only so there won't be any issue in writing.
3. 8 bytes writing at 0xF0200028
This address can be written as 16*N+8 (16*0xF020002+8), So according to previous given table at this address we can write 8 bytes. And here we are writing 8 bytes only so there won't be any issue in writing.
4. 8 bytes writing at 0xF020003C
This address can be written as 16*N+C (16*0xF020003+0xC), So according to previous given table at this address we can write only 4 bytes. And here we are writing 8 bytes, and this writing won't be possible. That means data will not get write into the memory in this case.
5. 8 bytes writing at 0xF0200040:
This address can be written as 16*N (16*0xF020004), So according to previous given table at this address we can write 16 bytes. And here we are writing 8 bytes only so there won't be any issue in writing.
And here is my practical test data for above cases:
And i am attaching my tested project for the reference:
--
Thanks & Regards,
Jagadish.