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.

Programming msp430 information memory separately

Hi,

I have developed an application for msp430 (F5328) that interfaces with a device that needs to be calibrated.

At the moment, the application stores the calibration data (calculated using a dedicated pc-based software) within an array.

My idea would be to store the calibration data to the msp430 flash (information memory) so that I don't need to recompile the firmware every time for each board.

So, my question is: is it possible to program the msp430 flash (information memory) with the calibration data separately from the firmware?

  • Samuele,

    yes i believe so that you can program the info memory separately from the firmware in the main memory.

    However you need to take care that the info memory is usually protected for programming. So what i can think of is the following procedure:

    - unlock the INFO memory: http://processors.wiki.ti.com/index.php/MSP430_FAQ#How_to_protect_the_calibration_data_in_INFOA_memory_on_MSP430x2xx_devices_during_programming_.3F - with the exception e.g. the INFOA containing factory device calibration values on MSP430x2xx.

    - execute mass erase -> in this case the information memory will be also erased

    - write the firmware into main memory

    - write the calibration data in the info memory separately -> this shall not disturb the previous step of writing the main memory

    Another option i can think of is to use e.g. scripting tools to create a single binary file which contain both the firmware and the calibration data such as TI-TXT-Parser. But i am not sure whether this would suit you in your case.

  • Samuele Forconi said:
    So, my question is: is it possible to program the msp430 flash (information memory) with the calibration data separately from the firmware?

    Sure.

    Usually it's calibration firmware which shall write calibration data into INFO memory. When calibration done then calibration tool just loads production firmware without erasing INFO memory.

  • I'm not sure if I have understand well...

    I have to develop a "calibration firmware" that loads the calibration data and store them in the msp430 information memory.

    Then, after I've executed the "calibration firmware", I reprogram the msp430 with the "production firmware" without erasing the flash memory.

    Is that correct?

  • Samuele Forconi said:
    Then, after I've executed the "calibration firmware", I reprogram the msp430 with the "production firmware" without erasing the flash memory.

    Without erasing info flash memory. Of course, to reprogram code flash, you need to erase it first

  • Samuele Forconi said:
    Is that correct?

    If you do it that way. But that is neither the only way nor (IMO) the best way.

    Build into your application a capability to receive the cal data from the PC (whether by UART or some other means) and pass that to a function that programs the data into an unused INFO segment.

  • Brian Boorman said:
    If you do it that way. But that is neither the only way nor (IMO) the best way.

    Sure this is not only way. In case of complex devices requiring operator-assisted calibration other approach could be needed:

    Brian Boorman said:
    Build into your application a capability to receive the cal data from the PC (whether by UART or some other means) and pass that to a function that programs the data into an unused INFO segment.

    Problem with built-in calibration is: you need code flash and i/o pin(s) for communication. What if you mass-manufacture dumb temperature sensor and flash is fully populated, no free pins and you need just to calibrate temperature sensor and perhaps trim RTC? We can think of many cases where one approach is better than another

  • If you have communication pins available in controller the external calibration is suitable and if there is constrain of communication pin availability separate firmware is suitable option. 

**Attention** This is a public forum