Skip to main content
AVM
Associate II
January 19, 2022
Question

Bootloader and application issue with SWT component

  • January 19, 2022
  • 14 replies
  • 6876 views

Hi,

I am working on SPC58NG84E7 bootloader.

Everything works fine - I have BL code(at 0xFC0000) which jumps to the APP location 0xFD0000 after waiting for 10sec after startup and executes the code there. Both codes are without SWT.

Issue - But when I added SWT component to BL, on powerOn BL is not running. swt_lld_stop() is called before jump.

If I start the BL through UDE debugger application it executes BL, jumps to APP, executes APP code, but then reset from APP and entering into BL is not working.

This issue remains in APP with SWT and without SWT both.

What could be the issue here?

Regards,

AM

    This topic has been closed for replies.

    14 replies

    ODOUV.1
    ST Employee
    January 24, 2022

    Hello,

    would you please test with this modified interrupt function in swt_lld.c:

    static void swt_interrupt_handler(SWTDriver *swtp)

    {

     /* Acknowledge the interrupt, no bit field access on TIF */

     swtp->swtp->IR.R = 1;

     /* Protection in case of swt_lld_stop */

     if (swtp->swt_config == NULL) {

    return;

     }

     /* call the callback, if set */

     if (swtp->swt_config->callback != NULL) {

      swtp->swt_config->callback(swtp);

     }

    }

    Best Regards,

    -Olivier

    ODOUV.1
    ST Employee
    January 24, 2022

    Hello,

    I think I found the root cause of your issue: you probably unchecked the from platform component->runtime settings

    you need to check it again:0693W00000JN7RuQAL.pngwould you please check it and confirm me it works fine again ?

    Regards,

    -Olivier

    ODOUV.1
    ST Employee
    January 28, 2022

    Hello,

    is it fixed ?

    Best Regards,

    -Olivier

    AVM
    AVMAuthor
    Associate II
    February 14, 2022

    Hi Olivier,

    When I simply shifted from SWT0 to SWT2, it is working fine.

    Don't know exactly the reason behind.

    Warm Regards,

    AVM

    ODOUV.1
    ST Employee
    February 25, 2022

    Dear customer,

    This is the root cause:

    The SWT2 is enabled by default at MCU reset

    the other are disabled.

    When you are using SWT0, you are managing it well, but the SWT2 is resetting the MCU.

    When you are using the SWT2, you reprogram it and managing it well, so it works.

    With last driver version the behavior was fixed: all SWT are disabled by default at boot.

    BRs,

    -Olivier