S32K144 longword command to program p-flash

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

S32K144 longword command to program p-flash

Jump to solution
7,173 Views
ericgasteiz
Contributor I

Hi there, I'm trying to program an .srec file to the p-flash of an S32K144 from a bootloader using the c90tfs_flash_driver. Actually it works pretty well. Nevertheless, I have noticed that usually the last line of the .srec file isn't programmed into the flash. It's because the data lenght of that line, which is sometimes 4 bytes, is misalligned with the p-flash block size, which are 8 bytes and the function FlashProgramm returns FTFx_ERR_SIZE .  Using the FlashProgram function which it makes use of the Program Phrase command (0x07) instead of the Program longword(0x06). After doing some research within the RM of the S32k144, I realised it doesn't show "program longword" as an available command in this family of MCU. So my questions are, is it possible to program 4 bytes into the p-flash in this MCU? is the program longword command supported in this device?

0 Kudos
Reply
1 Solution
7,118 Views
ericgasteiz
Contributor I

HI David, thanks for your answer in advance. Yes I came out with that srecord tool to and is the only way I have by now to make it work. I found the solution in this post: https://community.nxp.com/t5/S32K/Flash-program-on-S32K142/m-p/1022166/thread-id/6289

View solution in original post

0 Kudos
Reply
3 Replies
7,119 Views
ericgasteiz
Contributor I

HI David, thanks for your answer in advance. Yes I came out with that srecord tool to and is the only way I have by now to make it work. I found the solution in this post: https://community.nxp.com/t5/S32K/Flash-program-on-S32K142/m-p/1022166/thread-id/6289

0 Kudos
Reply
7,121 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Also there is a srec-cat tools offering advanced capabilities as conversion between formats or formatting to predefined length as it may be required for bootloaders and similar features:

https://srecord.sourceforge.net/

0 Kudos
Reply
7,122 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, there is no such option there. I have checked with driver, and this option is greyed out, apparently it is related to other devices.

davidtosenovjan_1-1696580250554.png

 

Program Section command granularity is the same Program Phrase. Addresses must be 64-bit aligned i.e. per 8 bytes.
0 Kudos
Reply