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.

MSP430F5529: UART BSL unique entry

Part Number: MSP430F5529

We are currently developing FOTA for the msp430f5529 which we are using on one of our boards. This board is connected to another board which has STM32F405 on board and connected with UART. 

This STM based board is connected to another hmi microprocessor by uart. We want to send the firmware file to hmi and it will be stored there. When there is an update permission from the user, this file will be transferred to stm based board by uart and this board will transfer this file to first msp430 based board without storing at all, i.e real time transfer to msp and stm32 is just an agent in this transaction. 

Now,

What i am looking for is as follows- 

1. We do not want to use BSL method hardware explained in SLAU319AF - MSP430Tm Flash Devices Bootloader (BSL) i e. We do not wish to use DTR and RTS pins but only want to use Rx and Tx. 

2. We want to reset the microcontroller by software to pull the microcontroller into boot set. (Software reset) 

3. If above two conditions are met, then please also give some guidance on how to achieve safety of upgradation/ update fallback if update failure of BSL and security. 

Examples of the same would be really appreciated. 

  • Yes, we do support software invoke but it need the application to include the invoke code. 

    You can refer to this document

    https://www.ti.com/lit/an/slaa600d/slaa600d.pdf 

  • This software code is written in perl and its a pc based utility tool. I have to write this full code into stm32 based controller board which i explained above to invoke msp430. Is there any documentation to do this by microcontroller and not by pc/processor.  

  • The perl file is just to convert the TI-TXT format file to c file that can be called in the C code project. It is using a MSP430 to update the other MSP430.

  • Do you have sample code for this? Because after reading the document you have provided, its getting hard for me to align everything and start from scratch. 

  • Thank you for the code, Gary. This cleared lot of my doubts. Just a final query before I resolve this thread. I can see that there is a program called Host_Examples_for_F5529_Target which loads single or dual apps to the target. Basically, this job will be done by the STM32 controller I am using. What changes are required to modify this code to STM32. I can understand that its completely different device but can you explain something in brief. 

    Let me rewrite this again for better understanding.  HMI of the device will receive the file (as you said this file will be in ti-text format) this file will be transferred by HMI processor to STM32 byte by byte on UART. STM32 will just transfer this from UART1, byte by byte to MSP430 which is on different UART2. 

    So, where is the scripter in this case. I guess scripter will be installed in HMI processor. I have checked the code you have provided, specifically the HOST example. but its not getting clear that example is just loading app1 or app2 already written in the code. 

  • I guess MSP BOOT is used when host is only MSP device. What to do when the host is STM processor or a microcontroller

  • You need to porting the code in ...\Flash\MSPBoot_2_00_00_01\MSPBoot\Host_Examples\Host_Examples_for_F5529_Target to STM. And for the image file the need be downloaded into the msp430 you need to use the perl script to convert it to C code file that can be called by the host(STM) more detail you can refer to the section 4.1.2.1 in the application note.

  •  Stm is getting the c code file from hmi processor. How the stm will collect all the binary data by Uart and create a c file code to sent it to target(msp) even if i port the host application to stm. Currently stm controller does not have any memory space left to save anything. That is why i mentioned that stm will only receives bytes and send it to msp without storing anything. Can i just receive a byte and without saving the whole file code into a buffer, i just process a byte and send it to msp as per BSL protocol. 

    1. *What format is needed for hmi processor to send this data to intermediate stm controller so that i can process the byte, checks its crc, not complete app crc as there is no app compiled here in host like your code. It receives byte, checks its crc like the function in your code which checks 16 bit crc and then  convert it to bsl command and send it to msp over uart. Can you clearly erite  something. I can compile the target code in hex, intel, ti txt etc. And feed it to stm. Please clearly mention this and procedure..  Section  section 4.1.2.1 does not provide such info as such. After sending multiple messeges, the doubt is still remains as it is from the first message i posted which was point to point. 
  • Also tell me if I can use P3.3 and P3.4 for UART for such software based BSL flash. As I can see, P1.1 and P1.2 are used for BSL flash by USRT. Is this possible?

  • Hi Gaurav,

    Sorry for the late response. For the BSL protocol  you can follow the section 2.4.2.1 BSL-Based Protocol

    MSPBoot – Main Memory Bootloader for MSP430 Microcontrollers (Rev. D) (ti.com) 

    Due to the bootloader is totally open source so you can use any UART port on the device.

**Attention** This is a public forum