S32K144 longword command to program p-flash

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32K144 longword command to program p-flash

跳至解决方案
7,387 次查看
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 项奖励
回复
1 解答
7,332 次查看
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 项奖励
回复
3 回复数
7,333 次查看
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 项奖励
回复
7,335 次查看
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 项奖励
回复
7,336 次查看
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 项奖励
回复