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.

MSPM0G1507: Flash the firmware using JLink without invoking BSL

Part Number: MSPM0G1507
Other Parts Discussed in Thread: SYSCONFIG,

Tool/software:

I have encountered an issue related to the BSL functionality. Here are the details:
  1. Whenever I flash the firmware, I have to invoke the BSL by performing a Power-On Reset (POR), which involves shorting the BSL PA18 pin to VCC before powering up the device. However, I use JLink for flashing, which operates via the SWDIO and SWDCLK pins.
  2. Based on the information provided in the datasheet and user manual, BSL is typically required only when programming via UART or I2C. I am not using either of these interfaces for programming; instead, I rely solely on JLink( SWDIO, SWDCLK, NRST and VCC and GND pins).
Could you please provide guidance on how I can disable the BSL functionality on the PA18 pin and allow us to flash the firmware using JLink without having to go through the BSL invocation process each time?
  • Hi,

    You can use SWD directly, and connect PA18 and GND. In this situation, you will never enter into BSL.

  • I used SWD pins as mentioned above , But PA18 is always required? like before I connected to VDD 

  • Hi,

    If you use Jlink to download or debug something, I think you can ignore BSL. But once you re-power, if you want to run your self code, please put PA18 to GND, or it may run into BSL mode.

    Other way is to disable BSL or change BSL invoke pin. You can change it in NONMAIN(Sysconfig NVM part).

    Regards,

    Zoey

  • Hi,

    I connected the board to the JLink programmer following TI’s guidelines for hardware connections. I initially used the JFLASH tool to program but encountered a connection error.

    To work around this, I shorted the PA18 pin to VCC before powering on the board, which invoked the BSL mode. Once in this mode, I was able to successfully establish a connection between JLink and the board and proceed with the flash programming.

    But I don't want that, I'm thinking that I don't want any short in the hardware,

    Note: I disabled the SWD pins in my application code(DL_SYSCTL_disableSWD());, but the POR re-enabled the SWD pins, correct?

    Does MSPM0G1507 MCU need any sequence to flash with jlink or script etc

    Observation: Whenever I program with jlink, the MCU should reset and halt but it doesn't, the MCU resets but the application starts immediately instead of halting.

  • Hi,

    To work around this, I shorted the PA18 pin to VCC before powering on the board, which invoked the BSL mode. Once in this mode, I was able to successfully establish a connection between JLink and the board and proceed with the flash programming.

    It is because you have entered into low power mode, where J-link can not connect it. And once you run into BSL mode, it will wake up ,and re-enter into low power mode after around 10s.

    Please follow below step to solve it.1106.How to connect MCU in low power mode with J-link.pptx

    Note: I disabled the SWD pins in my application code(DL_SYSCTL_disableSWD());, but the POR re-enabled the SWD pins, correct?

    Yes, you POR will re-enable SWD, but then MCU will run the code and SWD will be disabled again. You J-link will not connect it also.

    Regards,

    Zoey

  • Hi

    Thank you, after I made the above changes, I can connect my board with JLINK, I doubt if this will make the read protective.

  • Hi,

    Glad to hear you have resolved this issue.

    The old version J-link has lost the function to wake up MCU so it can not connect it and that's way I give the script of this. And the newest version of JFlash has supported this.

  • Hi Zoey,

    what about read protection because any one can use this script and try to read the hex file.

  • Hi,

    We only have SWD access register to protect.

    You disable SWD in Nonmain.

  • Hi 

    Can we protect that from the compiler setting?

  • As far as I know, you can not disable that via compiler but MCU you configurate.

  • Thank you for help, I have one more question about to how to disable BSL PA18 pin and use for general purpose operation. I will create new topic for same.