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.

MSP430F6779A: MSP430F6779A Boot loader Design Help

Part Number: MSP430F6779A

Hi,

I am working with a Smart Energy Meter design with MSP430F6779A micro controller. As per the smart meter specification ,it's mandatory to have a remote firmware update(OTA) provision.  From my understanding, as we are using MSPF6XX series , BSL can be modified for our requirement. For our requirement the new image will be downloaded to a SPI flash , after successful download the application has to invoke boot loader and load the new image from SPI flash.

1) Can i Implement this with a custom BSL?

2) Do you have any example addressing this requirement?

Please help.

Thanks and Regards

Sreekanth MK

  • 1- Yes.
    2- Think of the BSL as a simple loop that copies a set of bytes from the SPI flash to some flash in the MSP430 when some condition is asserted. Nothing fancy about it.

  • Hi MIke,

    Thanks for the replay.

    I went through the application report SLAA450, As per my understanding, I can invoke BSL in boot time (based on bsl protect function return value) or with Z-Area functions .

    Case1: BSL in boot time

    As i discussed earlier, the new firmware will be downloaded to a SPI flash, and this image has to be loaded. AS there won't be any manual intervention for the process like pressing a button / any assisting co-processors , how could i intimate the BSL that a new firmware is available.Like If i put some key(like 0xDADA) to some general purpose registers like R11(or any other register to intimate BSL), will that value be cleared during reboot?? If that is possible adding the code to bsl protect function would be easy, adding other peripheral drivers like I2c/ SPI would increase the code size. So could you give an outline for that??

    Case2:Z-Area function inerface

    We are using TI RTOS for application part. If i invoke bsl from user code with all user interrupts disabled still some RTOS interrupts will be running right?? So is it possible to invoke in that way??

    Regards

    Sreekanth MK

  • Bootloaders are the first code that gets executed when an MCU gets powered. So let's say that you write your bootloader to do the following:

    1. Run immediately after the MCU is powered.
    2. Disable all interrupts.
    3. Read byte 0 of the SPI flash. If byte 0 has a value of 1 (by the way, I am just simplifying this, as here I would personally add encryption to protect my device from using injected firmware):
      1. Copy the firmware from the SPI flash into the MSP430 flash.
    4. Run the firmware.

    Case 1: Step 3 will take care of this.

    Case 2: Step 2 will take care of this.

  • Hello,

    In addition to what is mentioned above, within the Custom BSL you can switch out the Peripheral Interface from the default UART to I2C or SPI. We have examples for I2C included in the code download for the custom BSL. you can add additional code as well to do the external memory boot process you are referring to. You may potentially need to cordon off additional Flash space outside the BSL memory range for some of this functionality.

    In addition, please remember if you are doing a SW invoke of the BSL, that you need to restore the core device and any peripheral the BSL may use to its default come up from Reset state. The reason for this is the BSL assumes you have just come out of reset and only changes module settings as it needs for operation without explicitly configuring every register.

**Attention** This is a public forum