Changes to the p_flash of the S32K312 may cause the program to run erratically.

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

Changes to the p_flash of the S32K312 may cause the program to run erratically.

110 Views
victory
Contributor III

Hi,nxp

1.By modifying the linker_flash_s32k312.ld file, the starting address of p_flash was changed from 0x00400000 to 0x00440200, resulting in the program malfunctioning, as shown in the attached image. The code is included in the attachment.

victory_1-1724139888319.png

2.The expected outcome is that the program does not feed the watchdog and should restart from the beginning, rather than malfunctioning.

That's all, thank you.

 

0 Kudos
Reply
5 Replies

71 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @victory,

I understand that this project should be flashed by a bootloader, right?

But if you flash the project directly (DM181S_S32K312_BOOT.elf), the SBAF then searches for the first valid IVT starting from the lowest address at 0x00400000.

danielmartynek_0-1724221857960.png

 

Regards,

Daniel

 

0 Kudos
Reply

65 Views
victory
Contributor III

Hi,danielmartnek

1.I understand that this project should be flashed by a bootloader, right?

Reply:Yes,There are other matters to pay attention to.

2.But if you flash the project directly (DM181S_S32K312_BOOT.elf), the SBAF then searches for the first valid IVT starting from the lowest address at 0x00400000.

ReplyAccording to your intention, when debugging the app project online without the bootloader, the starting address of int_pflash still needs to be set to 0x00400000.

3.Additionally, if we enable the HSE firmware later on, how should we debug the app project that does not include the bootloader, and how do we allocate memory?

0 Kudos
Reply

56 Views
danielmartynek
NXP TechSupport
NXP TechSupport

You can place it at 0x50_0000, which is a valid IVT address and it is in the next block, so it can be programmed by the bootloader in the 0x40_0000 block.

danielmartynek_0-1724237036105.png

 

Regarding the HSE_FW, please create a new thread.

 

Thank you,

BR, Daniel

0 Kudos
Reply

52 Views
victory
Contributor III

I modified the original project by changing the starting address of int_pflash to 0x00500000 in the linker_flash_s32k312.ld file, but the program still runs incorrectly. Am I misunderstanding something, or is there another area that I haven't changed?

1)linker_flash_s32k312.ld->MEMORY

victory_2-1724239588791.png

2)Schematic of program malfunction

victory_0-1724239499481.png

 

0 Kudos
Reply

11 Views
victory
Contributor III

Hi,

Erase the entire chip and reload the program.

Thanks

0 Kudos
Reply