S32K344 After installation HSE, user_boot jump to user_app, user_app can't running

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K344 After installation HSE, user_boot jump to user_app, user_app can't running

ソリューションへジャンプ
1,616件の閲覧回数
liyongfeng
Contributor II

If user_APP to the address 0x0040 0000 can run normally, then I first burn user_boot to 0x0040 0000, then burn the user_APP to 0x00440000, then through debugging software to debug APP, program will user_boot to the user_APP, then user_APP can single step debugging, unable to run at full speed, full speed running will enter abnormal interruption, HSE and SWAP firmware will cause this problem?

0 件の賞賛
返信
1 解決策
1,539件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

If you are touching the RAM before initialization, it is necessary to check the source of last reset. Only functional resets keeps the RAM content. So, the RAM should be always initialized after Power On and all destructive resets. If it is functional reset, you can skip the initialization. I guess that this could be the source of your troubles.

Regards,

Lukas

元の投稿で解決策を見る

0 件の賞賛
返信
6 返答(返信)
843件の閲覧回数
JonAnder_Amante
Contributor I

Hi, 

I am using the project "S32K344_Can_bootloader_RTD200" in the microprocessor S32K344. I want to download an application with the program of bootloader. I have achieved the jump from program to application but I have different questions.

1. I want to use #define EN_DELAY_TIME but when I uncomment the command in the folder "public_in", the program has different errors. My target to use "Backdoor", that is to say, I want to check if the program has to enter to bootloader or not. I don´t know the process and the different functions that I have to use to achieve the target. I want to use the function "Boot_CheckReqBootloaderMode(void)" but when I debug the program, it never enters to the "if". Could you explain me the process and the steps to achieve the target. I add different functions that I think are important. 

2. I don´t know if I have to modificate the parameters of "static tJumpAppDelayTimeInfo gs_stJumpAPPDelayTimeInfo = {FALSE, 0u};". I have to change this structure ? You can see all structure in one of the next pictures. 

I need the reply as soon as possible since I have to send a project very soon. 

JonAnder_Amante_0-1713770483434.png

 

 

 

 

 

JonAnder_Amante_1-1713770483440.png

 

 

 

 

 

JonAnder_Amante_2-1713770483443.png

 

 

 

 

 

JonAnder_Amante_3-1713770483486.png

 

 

 

 

 

JonAnder_Amante_4-1713770483459.png

 

 

 

 

Thank you for all, 

Jon Ander Amante Jorge

0 件の賞賛
返信
1,591件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @liyongfeng 

If my understanding is correct, the application is working as expected if no bootloader is used but there are some issues if you jump from bootloader do the application, right? In this case, I don't think it's caused by HSE and A/B swap, it's caused rahter by insufficient deinitialization. The best way is to jump to the application right after reset. For example, if new application is loaded, do not jump to the application right after this download. Instead of that, reset the device by software and the startup files then should check some condition if application should be started or not. If the application is supposed to be started, do not run initialization in bootloader but jump to the application directly. If bootloader is supposed to be started to load new application, you can do all the initializations as needed. That's the best solution.

Regards,
Lukas

0 件の賞賛
返信
1,560件の閲覧回数
liyongfeng
Contributor II

when the bootloader jump to app,I also deinit gpt and can also off the global interrupt ,but the result still error.

liyongfeng_0-1684379454469.png

This issue was resolved after stopping the GPT clock.

liyongfeng_1-1684379920647.png

 

0 件の賞賛
返信
1,558件の閲覧回数
liyongfeng
Contributor II

The APP jumps to the boot with a flag written at 0x20443FF0, then I need to change it before 3FF0, otherwise the flag will be removed when the boot starts. However, the end address of the ram cannot start offline (there is no exception when the link debugger is debug), we try to add a new register and then copy the flag bit to the newly added register before initializing the ram, and then copy back to 20443FF0, but the phenomenon is still the same as above, offline, debug can run normally.

What causes this? How to solve this problem?

0 件の賞賛
返信
1,540件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

If you are touching the RAM before initialization, it is necessary to check the source of last reset. Only functional resets keeps the RAM content. So, the RAM should be always initialized after Power On and all destructive resets. If it is functional reset, you can skip the initialization. I guess that this could be the source of your troubles.

Regards,

Lukas

0 件の賞賛
返信
1,531件の閲覧回数
liyongfeng
Contributor II

Thank you! Has been solved in your way.

0 件の賞賛
返信