cancel
Showing results for 
Search instead for 
Did you mean: 

Bootloader and application issue with SWT component

AVM
Associate III

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

21 REPLIES 21
AVM
Associate III

Hi Olivier,

I already have added the callback function and also stopped the SWT before jump.

Thanks & Regards,

AVM

AVM
Associate III

Hi Olivier,

when you say:

"on powerOn BL is not running", it means -

When I flash the BL code, disconnect the debugger and reset hw, that time BL doesn't run.

But when I flash the BL code, start the code through debugger, BL runs correctly and jumps also.

SWT is activated on BL only.

Thanks & Regards,

AVM

ODOUV.1
ST Employee

Could you try to Erase your complete Flash

Flash again your program BL and APP (check there is no recovery between them with addresses and sizes)

Boot your board without debugger

Regards,

-Olivier

AVM
Associate III

Hi Olivier,

I am erasing complete flash before programming BL and APP every time.

What do you exactly mean by - 'no recovery between them with addresses and sizes'?

Thanks & Regards,

AVM

ODOUV.1
ST Employee

Hello,

I meant if your BL is at address1 and APP at address2 > address1

then the size of program BL must be less than (address2-address1)

No overlap between BL and APP in flash memory

BRs,

-Olivier

AVM
Associate III

Hi Olivier,

These things are verified.

There is no overlap between BL and APP.

Thanks & Regards,

AVM

ODOUV.1
ST Employee

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

Do you use only 1 SWT device or several ones ?

Could you test with Time period 40000 or greater to let time to your APP to boot ?

ODOUV.1
ST Employee

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

Hello,

is it fixed ?

Best Regards,

-Olivier