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.

F2812 FLASH sectors



Hi,

We use the F2812 with DSP/BIOS and program all code into the internal FLASH, no data is stored in the FLASH.  Our project has grown so I need to update the tfc and cmd files for more FLASH space.

I see that most example code has the FLASH in sector pairs, AB, CD, EF, GH, IJ but spra958g uses all the sectors together, FLASH_ABCDEFGHIJ. In the .tcf file it's defined as one large memory block:

bios.MEM.create("FLASH_ABCDEFGHIJ");
bios.MEM.instance("FLASH_ABCDEFGHIJ").base = 0x3d8000;
bios.MEM.instance("FLASH_ABCDEFGHIJ").len = 0x1ff80;
bios.MEM.instance("FLASH_ABCDEFGHIJ").createHeap = 0;
bios.MEM.instance("FLASH_ABCDEFGHIJ").comment = "On-Chip Flash Memory";
bios.MEM.instance("FLASH_ABCDEFGHIJ").space = "code";

Other than not allowing erase of some sectors or reprogramming the FLASH from the running program are there any disadvantages of configuring the FLASH as one large sector?  Is there any risk of code crossing a boundary of say sector B and C?

Thanks

Simon

  • Hi Simon,

    There are no issues with code crossing a sector boundary nor any other operational issues.  The reason the sectors are there is to allow targeted erasure and reprogramming, as you said.  From a performance perspective, it also makes no difference where your code and data is (e.g., it is no better to have code and data in seperate flash sectors than to have them both in the same sector).  So, go ahead and clump the flash together in the .tcf to get the large flash that you need.

    Regards,

    David

  • Hi David,

    Thanks for the reply.  That is what I thought, but I wanted to be sure.

    Regards,

    Simon