Debug_Flash won't remain working after restart the board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debug_Flash won't remain working after restart the board

1,173 Views
wei_w_he
Contributor IV

Dear NXP,

We are using S32K118 EV board, following the step, I create a simple DS project just to light up LED, we use the debug_flash option, and it is working after loading is completed, but when I power down and power up the board again, the LED won't light up again. i.e. seems programmes didn't flash inside the flash. I have attached my project code, can you advice what could be wrong with my project setting?

(If I try to use the example project from NXP, there is no such issue).

Thanks and best regards

He Wei

3 Replies

1,115 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

If I create new project without SDK, the definition is present, so it works.

If I create new project with SDK, the definition is missing. So, the problem is on our side. I will report it. Thanks for bringing this into our attention.

Regards,

Lukas

1,115 Views
wei_w_he
Contributor IV

Dear Lukas,

Finally it solved my problem. Thanks a lot.

BR

He Wei

0 Kudos
Reply

1,115 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

I can see it's caused by missing ECC initialization of RAM memory:


#ifdef START_FROM_FLASH

    /* Init ECC RAM */

    ldr r1, =__RAM_START
    ldr r2, =__RAM_END

    subs    r2, r1
    subs    r2, #1
    ble .LC5

    movs    r0, 0
    movs    r3, #4
.LC4:
    str r0, [r1]
    add    r1, r1, r3
    subs r2, 4
    bge .LC4
.LC5:
#endif

This code in startup file is not executed because START_FROM_FLASH is not defined in the project. You can add the definition here:

pastedImage_1.png

And then it will work.

Regards,

Lukas

0 Kudos
Reply