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.

LP-MSP430FR2476: Firmware Program doesn't execute after flashing through uart(BSL)

Part Number: LP-MSP430FR2476
Other Parts Discussed in Thread: MSP430FR2311, MSP430FR2476

Hi team,

I am working on BSL using MSP430FR2476 firmware update using MSP430FR2311 being the host. I have used the reference of MSP430Tm FRAM Devices Bootloader (BSL) and MSP430FRBoot – Main Memory Bootloader and
Over-the-Air Updates for MSP430Tm FRAM Large Memory Model Devices   and created the Host and Target setup.
 MSP430FR2311 host, MSP430FR2476 Target and application code(LED Blink) generated the .txt file and converted .c file and merged with MSP430fr2476 boot code. The host and target work correctly without any errors.
All commands executed properly and TI_MSPBoot_APPMGR_JUMPTOAPP() executes (but the LED doesn't toggle).
Below is the zip file containing all the file i have used for the program execution.

MSP_Boot.zip


Regards

Pallavi

  • Hello Pallavi,

    1). Firstly, check whether the address of your application and the address pointed by the  TI_MSPBoot_APPMGR_JUMPTOAPP() is same;

    2). Secondly, read the Flash data out and compare it with the code you want to update, check whether the code updated into FLASH is correct;

    3). Thirdly, I will be out of office until 14th April, if you have any other issue, I will help you after I back to office. And if your issue is urgent, you can set a new post, and our American colleague will help you in 24 hours.

    Best Regards,

    Janz Bai

  • Hi,
    Thank you for the reply
    1.  below is the updated .c file generated for application 

    #include <stdint.h>

    #define App1_SIZE 210

    const uint32_t App1_Addr[4] = {
    0xC402,
    0xF7DA,
    0xF7F8,
    0xF7FE,
    };

    const uint32_t App1_Size[4] = {
    204,
    2,
    2,
    2,
    };

    const uint8_t App1_0[] = {
    0x31,0x40,0x00,0x30,0xB0,0x13,0x26,0xC4,0xB0,0x13,0xC2,0xC4,0xD2,0xE3,0x02,0x02,
    0x92,0xC3,0x82,0x03,0x00,0x13,0x3F,0x15,0xC2,0x43,0x1D,0x02,0xB0,0x13,0xAA,0xC4,
    0x3C,0x17,0x00,0x13,0xB2,0x40,0x80,0x5A,0xCC,0x01,0xD2,0xD3,0x04,0x02,0xD2,0xD3,
    0x02,0x02,0x92,0xC3,0x30,0x01,0x3F,0x40,0x46,0xE8,0x03,0x43,0x1E,0x43,0x3F,0x53,
    0x3E,0x63,0xFD,0x2F,0xD2,0xC3,0x02,0x02,0x3F,0x40,0x46,0xE8,0x03,0x43,0x1E,0x43,
    0x3F,0x53,0x3E,0x63,0xFD,0x2F,0xD2,0xD3,0x02,0x02,0x3F,0x40,0x46,0xE8,0x03,0x43,
    0x1E,0x43,0x3F,0x53,0x3E,0x63,0xFD,0x2F,0xD2,0xC3,0x02,0x02,0xF2,0xD0,0x80,0x00,
    0x03,0x02,0xF2,0xD0,0x80,0x00,0x07,0x02,0xF2,0xD0,0x80,0x00,0x19,0x02,0xF2,0xD0,
    0x80,0x00,0x1B,0x02,0xF2,0xC0,0x80,0x00,0x1D,0x02,0xB2,0x40,0x10,0x00,0x82,0x03,
    0xB2,0x40,0xE7,0x03,0x92,0x03,0xB2,0x40,0x10,0x01,0x80,0x03,0x03,0x43,0x32,0xD0,
    0xD8,0x00,0x03,0x43,0x0C,0x43,0x10,0x01,0xB2,0x40,0xDE,0xC0,0x00,0x20,0xD2,0xD3,
    0x02,0x20,0x32,0xC2,0x03,0x43,0xB2,0x40,0x04,0xA5,0x20,0x01,0xFF,0x3F,0x03,0x43,
    0x80,0x00,0xCA,0xC4,0xFF,0x3F,0x03,0x43,0x80,0x00,0xC6,0xC4,};

    const uint8_t App1_1[] = {
    0x18,0xC4,};

    const uint8_t App1_2[] = {
    0x0E,0xC4,};

    const uint8_t App1_3[] = {
    0x02,0xC4,};

    const uint8_t *App1_Ptr[4] = {
    App1_0,
    App1_1,
    App1_2,
    App1_3,
    };


    so the application code starts writing from location 0x00C402.
    This is the macro defined in the program: #define TI_MSPBoot_APPMGR_JUMPTOAPP() {((void (*)()) _Appl_Reset_Vector) ();}
    Appl reset vector from lnk_cmd file is 

    /* Reserved Flash locations for Bootloader Area */
    __Boot_Start = 0xf800; /* Boot flash */
    __Boot_Reset = 0xFFFE; /* Boot reset vector */
    __Boot_VectorTable = 0xFFA2; /* Boot vector table */
    __Boot_SharedCallbacks_Len = 0x10; /* Length of shared callbacks (2 calls =4B(msp430) or 8B(msp43 ) */
    __Boot_SharedCallbacks = 0xff70; /* Start of Shared callbacks */
    _Appl_Vector_Start = 0xf7a2; /* Interrupt table */
    /* Reserved Flash locations for Application Area */
    _Appl_Checksum = (_Appl_Start); /* CRC16 of Application */
    _Appl_Checksum_8 = (_Appl_Start+2); /* CRC8 of Application */
    _Appl_Start_Memory = (_Appl_Start+3); /* Application Area */
    _Appl_CRC_Size1 = (_Appl_End - _Appl_Start_Memory +1); /* Number of bytes in lower memory calculated for CRC */
    _Appl_CRC_Size2 = (_Flex_End - _Flex_Start + 1); /* Number of bytes in upper memory calculated for CRC */

    _Appl_Reset_Vector = (__Boot_Start - 2);

    Either the addresses  are generated from tools.  Do i need to change the address of TI_MSPBoot_APPMGR_JUMPTOAPP()

    2. Below is the data generated from .c file and being sent to target and i have checked with memory location. The data is written 
      


    Regards,
    Pallavi Y

  • Hello Pallavi,

    1). You should ensure the TI_MSPBoot_APPMGR_JUMPTOAPP() can let pointer jump to the address of your application code;

    2). I mean you should read out the Flash data after you complete the update, and compare the data in the FLASH with the data you want to write to Flash, and check whether they are same.

    3). You can summarize your questions and test results, and set a new post, my American colleague will respond to you in 24 hours because I am going to catch the plane soon and can't reply to you in next few days.

    Best Reagrds,

    Janz Bai

  • Ok thank you i will set a new post

  • OK Pallavi. I will close this thread now and hope you can resolve your issue soon and get a satisfactory answer. Grinning

  • Thank You,

    I was able to resolve the issue. The problem was TI_MSPBoot_APPMGR_JUMPTOAPP() was not pointing to the application code.
    __disable_interrupt();
    ((void (*)())0xC402)();
    adding this line helped me point to the application address 

**Attention** This is a public forum