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.

UNIFLASH: placing data at specific locations in flash.

Part Number: UNIFLASH
Other Parts Discussed in Thread: F28M36P63C2

We are using Uniflash to program our F28M36P63C2 device.

We would like to be able to place a small amount (around 8 bytes) of calibration data in a spare bank of the C28 core's flash independently of programming the main application code.

This would need to be at an address that we can define so that the application can access the entered values.

Is this possible? If so, can you give an example of the file format we need to generate, and the Uniflash command line necessary?

Many thanks.

  • Andy,

    Just to make sure we understand correctly: You want to store some data in a separate sector in C28x Flash bank. However, you don't want to keep it as part of the main image.  And instead you want to program the Flash twice - once for application and once for the data.  Correct?

    Is there any reason why you dont want that data to be part of your application image?  Maybe the data is different for different devices and hence you want to separate it from the main application?

    Or Are you saying that you want to program that data at run time? (I dont think this is the case since you are saying you want to do this using UniFlash). 

    Thanks and regards,

    Vamsi

  • Hi Vamsi,

    That is correct.

    We need to put calibration data in each unit according to the result of a test that we do after programming and running the main image.

    We want that data to be available when we restart the main application after loading the data to the separate flash bank.

    This will be done as part of production test.

    Best regards,

    Andy

  • Andy,

    You can achieve it by loading a binary file.

    We will provide more details to you in a day or two on this.

    Thanks and regards,
    Vamsi

  • Andy,

    Sorry for the delay. You can create a binary file and load it to achieve this. 

    To create a binary file, you can use a hex text editor like Notepad++ with HEX-Editor plugin.  Once you have it, you can just enter the data you want to load, and save it as a .bin file.  Use UniFlash (GUI or CLI) and load the binary file. You need to provide the load address - the start address where you want the data to be loaded.  Make sure you use the "Program Only" option in "Download Settings" to avoid erasing your application.  

    Let us know if you have further questions.

    Thanks and regards,
    Vamsi

  • Thanks Vamsi.

    We may also need to update the application code without erasing the calibration data. It would be good if we could erase the sectors required for each operation individually. Ideally we would like to erase the application sectors and program them, and erase the calibration sector when we program that. Is this possible?

    Also, do we need to generate binary data for the whole sector, or just the data that we want?

    Thanks,

    Andy

  • Is there a complete user guide for Uniflash for the processor we are using?

    I can only find a Quick guide and would like to see more detail.

  • Andy,

    Sorry for the delay. This post is not assigned to me and hence could not track. I assigned it to myself now, so that I can track.

    Regarding your question on sector specific erase: Yes, it is possible. In UniFlash GUI, you can use the Erase Settings available in Settings and Utilities tab. There is an option of Necessary sectors only - when you choose this option, UniFlash will erase only the sectors that have some content allocated to them (in user application linker/map).  You can use this. Or, you can use Selected Sectors Only option - when you use this, you can choose which sectors you want to erase.

    Regarding the binary data: No need of generating for whole sector. Note that UniFlash starts loading from the start address you give. Make sure the locations that you want to program are erased. 

    Regarding the user guide: We don't have a device specific user guide. Let me know what you are looking for and I will see if I can point to a corresponding info. 

    Thanks and regards,

    Vamsi

  • Many thanks Vamsi.

    I will be working on this project again tomorrow, but I think  you have told me everything I need to know now.