0
votes

I am working on TI CC MCU. I have a confusion. Please clear.

As per my understanding while system boots, The booting data is loaded into the ROM to execute from Flash in starting. Suppose I am using 128KB internal flash memory for my program data and code, even after that there is free space in internal Flash (lets say 50KB or something); If my system having external flash too, Can I move the external flash data to the free space of my internal flash memory to only use internal flash ? if possible, please let me know how can I do that? Thanks a lot.

Regards

1
Yes, of course, the internal flash memory that is not used for code can be used for data. You haven't provided enough information to answer how. How do you currently obtain and write the data to external flash? Is the data known at build time or is it collected at run time? Is the data constant or does the application overwrite it occasionally?kkrambo
Hello @kkrambo, Thanks for your reply~ well, I am already using external flash for store the data while also using internal flash for code/data. I just want to store the data in internal flash which I was storing in external flash. In turn, I want to use only one internal flash memory for my code and data. Please guide me how can I move the data in external flash to internal flash ? Is this need many more changes ?Emlinux

1 Answers

0
votes

The manufacturer usually provides examples on how to use the internal Flash. The example should include routines to erase, write and read the flash memory.

Take into account that MCU internal flash has some limitations.

  • If you are writing to a flash block, you cannot read or execute code from the same flash block at the same time
  • Flash must be erased in sectors and then written in a minimum size that will depend on the technology and implementation used by the manufacturer

If your MCU has 128 Kb of Flash or less, you will probably have only one block of flash (1 block with several sectors, see the Reference Manual for more details). If that is the case, then you will need to copy a small routine to flash and execute from there when you need to write or erase the flash.