Code can't run when using IAR for S32K116 application

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

Code can't run when using IAR for S32K116 application

827 Views
xch0520
Contributor I

Dear.

I am using the IAR 8.32 for the S32K116 firmware development. The debugger using the JLINK V9 works fine which can download the code, online running and live watch with the IDE correctly. But when I disconnect JLINK debugger to my board and power on the board independently, the S32K116 can not work, the firmware does not run in this situation. I also pull down the RESET_b pin to the ground in order to get a reset, but it doesn't run as well. Could you give me some advice for check this issue. I have following questions about this. Besides, If you have other suggestions about this issue, please kindly tell me as well. Thank you very much.

1. I don't know if my code has been download to the FLASH address. How to check it?

2. How to deal with the MCU's RESET_b pin connection? At present, I have pulled up a 4.7k resistor to the VCC.

3. How to check the power on reset is performed.

4. How to setup the IAR for S32K116 when need to boot from flash?

0 Kudos
1 Reply

649 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Miller Xue,

Regarding your questions please see my comments below.

1. I don't know if my code has been download to the FLASH address. How to check it?

In IAR you can check the disassembly section while debugging to determine if you are running either from Flash or RAM memory. For example, in the following image I was running from flash:

pastedImage_5.png

And in the following image, I was running from RAM.

pastedImage_6.png

2. How to deal with the MCU's RESET_b pin connection? At present, I have pulled up a 4.7k resistor to the VCC.

According to the Hardware Design Guidelines for S32K1xx Microcontrollers document:

The reset line has an internal pull-up resistor. If the environment and the customer application is noisy, an external pull up resistor(between 10KOhmshms-100KOhms) can be added and to avoid a sporadic or unintended reset occurs.

3. How to check the power-on reset is performed.

Please, refer to the first reply of the following community thread.

4. How to set up the IAR for S32K116 when need to boot from flash?

The following community document explains how to import one project from S32DS to IAR. In section, 1. Modify the Linker configuration and remove ProjectInfo.xml you select the linker, here you can select the linker to boot either from RAM or Flash. You need to select the Flash linker.


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos