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: BSL- changing only non-main memory

Part Number: LP-MSPM0L1306
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hello Team,

I've got some questions about BSL NON-MAIN configuration.

1.

In MSPM0 BSL implementation guide doc, I could find steps to disable PA18 invoke pin through SYSCFG. After disable pin & enable non main memory erase, the next step is to "Build the project in Code Composer StudioTm (CCS) and then download the code into flash."

Does "downloading the code" mean I just need to "debug project"?

Would that make the change take affect? 

2.

Also, how can I disable GPIO invoke pin in customer's board? I don't have customer's code or project.

With BSL SDK example's ccxml file, I could see the connection.

But how do I change the Non Main memory? 

I've read this link : flashctl_nonmain_memory_write and wonder if I have to change the boot_config.c file.

Thanks in advance for your support!

  • Hello Robin,

    1. Download the code means download the code. You can click this to download code  . And if you click this , you will enter debug mode, in fact, before entering the debug mode, CCS will also download the code into MCU. Both this two methods can download the code

    2. If you don't have customer' s code, you can let customer disable the BSL invoke pin by themselves. And you can also find that the Sysconfig configuration of disable BSL invoke pin is very easy. So why don't you let themselves try to do a simply click opetion in Sysconfig?

    You must know that the boot_config.c file is generated after you build the project (generated by Sysconfig). So modifying NONMAIN in the Sysconfig means modifying the boot_config.c. Modifying the Sysconfig is easier. Of course, you can try to modify boot_config.c by yourself. You need to modify:

    And I recommend you try to configure it in Sysconfig and observe which is modified. When you modify Sysconfig, you can check which is modified by seeing this files.

    And you must know that, if you want customer use the boot_config.c you shared with them, at the same time, you must let them copy the files Sysconfig generated from the debug folder to the root directory, and then place the boot_config. c in the root directory, and then exclude Sysconfig from build. Because if you don't do this, every time you build the project, Sysconfig will generate the boot_config.c if customer configurate the NONMAIN. and CCS will see the boot_config.c generated by Sysconfig as the reference to use. It is so complexed, because about how to exclude Sysconfig from build, we also have a guide need to refer to. 

    So please try to tell customer how to operate "disable BSL invoke pin" by themselves.

    Please refer to my commons here, please refer to it carefully because that are all the ideas I can give you now. Hope it can resolve your questions.

    Best Regards and have a nice working day!

    Janz Bai

  • Hello Janz,

    Thanks for your explanation and insight.

    So, is there no way to write NON-Main memory to customer's board using another SDK project code?

     

    And just to clarify your response, do you mean I should :

    1. modify Sysconfig NVM configuration to disable invoke pin(which is same as modifying boot_config.c) 

    2. Select "Erase MAIN and NONMAIN memory"

    3. Debug Project

    Best regards,

    Robin

  • Hi Janz, 

    Can I ask you one more question?

    When invoking BSL with MCU host, do I need to download code in the target board too?

    I was trying "bsl_host_mcu_to_mspm0l11xx_l13xx_target_uart" SDK and BSL doesn't seem to start. 

    Thank you for taking time to answer all my questions.

    Best regards,

    Robin

  • Hello Robin,

    I am out of office today, I will reply to you soon

  • Hi Janz,

    When I connect customer's board through SDK example's ccxml file, I could view memory. If I can find register related to bsl pin invoke, then would I be able to disable BSL invoke pin?     

    Best regards,

    Robin

  • 1. Yes, there is one register in NONMAIN, which is related to the BSL invoke pin. Configuring NONMAIN in Sysconfig is the easiest way to disable the BSL invoke pin. I recommend you implement your requirement in Sysconfig. About the register name, you can find it in TRM, please look for it from TRM.

    2. Our L1306 has ROM BSL. The ROM BSL is using PA18 as invoke pin by default. 

    3. BSL is a complexed but very useful function. There are two files you can refer to and learn. I think after you learn about these files, you will know how to use BSL normally.

    MSPM0 Bootloader (BSL) Implementation (Rev. C)

    MSPM0 Bootloader User's Guide

    And how to use the BSL demo code in SDK, you need read MSPM0 Bootloader (BSL) Implementation (Rev. C) carefully and follow it step by step. The "bsl_host_mcu_to_mspm0l11xx_l13xx_target_uart" is the BSL host MCU code when you use another MCU as BSL host.

    4. The easiest way is let customer do modification by themselves in Sysconfig to disable BSL invoke pin. It is just such as "click" operations on their side on Syconfig. If you must use other ways, I think there may be, but it will be very complexed, I think it is not necessary to use complexed method, not the easy method.

    5. 4024.Disable_bsl_invoke_PA18.pdf

  • Hi Janz,

    Thanks for sharing your knowledge. Now I understand methods to modify NONMAIN, thanks to your help.  

    And I guess modifying only the NONMAIN, and not erasing MAIN is impossible, am I correct? 

    Best regards,

    Robin

  • Hello Robin,

    In fact, even though you modify the NONMAIN in an empty project (you can find it in SDK), when you download code into MCU, some data still will be downloaded into MAIN flash, such as the vector table. So modifying only NONMAIN and download only NONMAIN data into MCU can't be implemented by some easy steps. To be honest, there are workarounds to implement your requirement, but it is complexed, I think, is more complexed than let customer modify NONMAIN directly in Sysconfig.

    Best Regards,

    Janz Bai

  • Thanks for clarifying Janz!

    Best regards,

    Robin Kim

  • You are welcome, Robin,