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-MSPM0L1306: How to start the main application after a successful custom BSL

Expert 4011 points
Part Number: LP-MSPM0L1306
Other Parts Discussed in Thread: MSPM0L1306

Hi Champs,

Custom BSL: I use the example project named "secondary_bsl_uart_LP_MSPM0L1306_nortos_ticlang"

Main application: I use a simple example project named "gpio_software_poll_LP_MSPM0L1306_nortos_ticlang"

Case 1:

Keep the projects as is. I can successfully load and start the main application which starts at 0x0000 0000 in flash memory. The BSL starts the main application by a POR.

Case 2:

Now I want to move the custom BSL to 0x0000 0000, and move the main application to 0x0000 2000. How can I start the main application after a successful boot loading? (Now a POR will starts the custom BSL since it resides at 0x0000 0000).


Regards,

Kien Nguyen

  • Hi Kien,

    You can directly call jump to function of MCU, to let MCU jump to reset handler of app code: Below is an example for your referencr.

    /* Force a Reset Handler Routine */
    AppStartAddress = *(__IO uint32_t *)(NVIC_APP_VectorAddress + 4);
    ((void (*)(void)) AppStartAddress)();

    If you set app code start from 0x00002000, and then NVIC_APP_VectorAddress should be set as 0x00002000.

    Becareful, if you want interrupts of app code working, you should firstly set the SCB->VTOR for interrupt table address and then enable the app code interrupt.

    B.R.

    Sal

  • Hello Sal,

    Thanks a lot for your reply.

    Regards,

    Kien Nguyen

  • Hi Kien,

    Sure, I will close the thread and if you have any further question, feel free to reply in the thread or file a new one.

    B.R.

    Sal