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.

MSPM0G1519: MSPM0G1519 BSL Entry from Application

Part Number: MSPM0G1519

Hello,

I am following up on https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1622209/mspm0g1519-bsl-entry-from-app which was inactive and hence locked.

You mentioned that for MSPM0G1519 it should be as simple as calling

DL_SYSCTL_resetDevice(DL_SYSCTL_RESET_BOOTLOADER_ENTRY);

function. Yet, after I execute this statement the application is re-entered after 200-250ms. During this time application is not active.

Is it possible that BCR runs but then BSL is not invoked but application start is triggered?

I also came accross https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1611380/mspm0g1519-bsl_err_01-also-required-for-mspm0g151x which suggest that DEVICEID should be > 0 for production samples. Yet I read 0.

The MSPM0G1519 housing has the following information printed:

MSPM0

G1519S

TI 548 C

CPV2 G4

 

What can I expect from this die version? Should the BSL entry from application work as simple as DL_SYSCTL_resetDevice(DL_SYSCTL_RESET_BOOTLOADER_ENTRY)?

Best Regards

Marco

 

 

 

  • Hi Marco,

    Thanks for reaching out. I have a couple of questions before I start digging out some answers to the questions being asked. 

    1. What package is this device? 

    2. What are the contents from the following register: BSLCONFIG0

    3. What is the full read number from the DEVICEID? How are you reading this register?

    4. Once you apply the reset, within the 200ms to 250ms window, is there any BSL interface connected to the device? If so, is there any BSL communication ongoing in this window?

    Best Regards,

    Diego Abad

  • Hi Diego,

    thx for your feedback. See the answers to your questions below:

    1. What package is this device?

    48 VQFN (MSPM0G1519SRGZR)

    2. What are the contents from the following register: BSLCONFIG0

    0xA812FFFF

    3. What is the full read number from the DEVICEID? How are you reading this register?

    I am reading through TI driverlib functions as shown below and get

    _VERSION= 0x00

    _PARTNUM = 0xBBA9

    _MANUFACTURER=0x0017

    4. Once you apply the reset, within the 200ms to 250ms window, is there any BSL interface connected to the device? If so, is there any BSL communication ongoing in this window?

    Physically there is an I2C connected but during the 200-250ms window it is idle - so no BSL communication taking place

    Best Regards

    Marco

  • Hi Marco,
    Thank you for confirming. I was able to verify this is a Rev C device (not sure why it shows a different value in the register). Nevertheless, I'll investigate this internally, and provide an answer promptly. 

    Best Regards,

    Diego Abad

  • Hello Diego,

    thx for clarification about the device revision.
    Hope to hear from you soon as we need clarity for our project if entering bsl from application is possible.

    Marco

  • Hi Marco,

    Please excuse the late response. I tested the example from my side and here are some follow up questions:

    1. After the DL_SYSCTL_resetDevice(DL_SYSCTL_RESET_BOOTLOADER_ENTRY) in the application code, as mentioned in the read me, the device will wait for a POR/BOR or for the BSL Host to send an application start command so the M0G3519 can re-start its Application. If your device is entering the application on its own, there might be something not being implemented correctly in the code. For that, can you let me know how are you testing this? If possible, can you provide the following:

    1. The example code you are using (is it a modified version of the SDK?

    2. The setup you have to update the Application in the device

    3. What is the behavior of this new application being loaded? And a follow up, how do you determine this 200ms-250ms delay? 

    Best Regards,

    Diego Abad

  • Hi Diego,

    thx for your reply. Please find below the answer to your questions:

    1. The example code you are using (is it a modified version of the SDK?

    I am using DL_SYSCTL_resetDevice(DL_SYSCTL_RESET_BOOTLOADER_ENTRY); from within our product code which is not TI SDK based. What I do is calling DL_SYSCTL_resetDevice(DL_SYSCTL_RESET_BOOTLOADER_ENTRY); from an interrupt context.

    2. The setup you have to update the Application in the device

    In my setup I am just looking at how to bring the device into BSL. In my tests I have no setup to update the application on the device. I just want to bring the device into BSL.

    3. What is the behavior of this new application being loaded? And a follow up, how do you determine this 200ms-250ms delay? 

    At the beginning of the application code I output a short pulse on a GPIO.
    I start the transition to BSL from application code upon recieving a certain message over I2C which I send from a PC host. I am monitoring the I2C lines and the GPIO. I see that 200ms after I recieve the I2C telegram I get a pulse on the GPIO - indicating an application restart. I am also sure that during the 200ms delay the application is not running because I am toggling the same GPIO in a while(1) loop after DL_SYSCTL_resetDevice(DL_SYSCTL_RESET_BOOTLOADER_ENTRY); but as expected never reach it.

    Is there a way how I can get more information about what exactly failed? Does BCR provide some error output?
    Regards Marco
  • Hi Marco,
    I tried and measure the time stamp between an update and the first instance of the update working. It seems to match the 200ms-250ms time frame you mentioned. I imagine that since there wasn't any update in your setup, the original application code was executed by default. I don't believe there is an error output that can be tracked for BCR failures. 

    Best Regards,

    Diego Abad

  • Hi Diego,

    yes that is what I am assuming. Yet the question remains why? 

    According to TI documentation application should only be started if a reset occurs or if the "start application" command is send. Both things are not happening.

    Do you have a working example where you can enter BSL from software for a MSPM0G1519?

    Regards

    Marco

  • Hi Marco,
    The first thing is happening in my example. I believe the delay might be coming from the firmware being updated into the device. I'm currently waiting for more input from my team members to double check it.

    As for the BSL from software, I would say you can comment out the while loop in the example to directly go and invoke the BSL using the 

    invokeBSLAsm. However, if there's nothing in the BSL, the device most likely won't do anything.
    Best Regards,
    Diego Abad
  • Hi Diego,

    I made an interesting observation. We were placing the SRAM ORIGIN in the linker file at 0x20200000 (unchecked region) - with this all SRAM accesses are done via this aliased region.

    When I change the SRAM ORIGIN to the default region 0x20000000 (ECC checked region) then DL_SYSCTL_resetDevice(DL_SYSCTL_RESET_BOOTLOADER_ENTRY); brings the device into bootloader and the device stays in bootloader as long as there is not power cycle or a start application command via the I2C interface - meaning everything works as expected.

    What is your assessment of this finding? Is this worth checking from your side and if you can reproduce thinking about publishing an Errata?

    Best Regards

    Marco

  • Hi Marco,
    Interesting observation. Can you share your linker file that changed this? I do want to try and reproduce it, and if it does end up being an errata or error, I will start the process for it.

    Best Regards,

    Diego Abad

  • Hi Diego,

    I send you the linker files (working and failing) via mail. 

    Regards Marco

  • Hi Marco,

    Thank you. I used similar configured linker files in my test projects (not the same since it is incompatible with the SDK examples.) After running both examples, I saw the same wait behavior described before. It seems the issue is in the image rather than anything else. In short, if the image being uploaded through BSL does not have anything running, it should not have the 250ms delay.

    Best Regards,

    Diego Abad

  • Hello Diego,

    as mentioned above I am not uploading any new image through BSL. So the issue can't be in the new image.

    I am just entering the BSL and my expectation is that the device stays in BSL until a power cycle or an explicit "start application" command. Yet, if I use the unchecked SRAM alias the "old application" is started and the device does not stay in BSL.

    Yet if I am using the default SRAM region the devices stays in BSL until a power cycle or an explicit "start application" command.

    So can you please verify this behavior? You don't need to program any new image .. just check if the device stays in BSL or not.

    Marco

  • Hi Marco,
    Understood. I double checked the examples again, and both don't start working after the BSL is invoked until either a POR or a direct commands. I'm attaching the "bad" cmd file I'm using for reference. Can you use it and see if the same persists in your setup? 

    Best Regards,

    Diego Abad

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/908/device_5F00_linker_5F00_bad.cmd