关于CCG5 platform Flash问题,在烧写images时,如何保留产线校准数据

公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
julius_yang
Level 1
Level 1
5 questions asked 5 replies posted 10 sign-ins

1. CCG5平台flash大小为128K,有512 row,每个row大小是256个字节

    通过PSoC Programmer烧写image时,会将128K的flash全部擦除,会导致校准数据和板卡信息丢失

2. PSoC Programmermer没法擦除指定flash,都是整个128K擦除,例如在flash中分配一个row来存储产线校准数据,如何保证在烧写images后,保留产线校准数据呢?谢谢

julius_yang_0-1665198321144.png

julius_yang_1-1665198359389.png

 

 

    

0 点赞
1 解答
ShifangZ_26
Moderator
Moderator
Moderator
10 likes given 250 sign-ins 1000 replies posted

Hello ,

一般对于某一行flash特殊使用简单的处理办法有2种:(建议使用第一种)

1. 在SWD更新时,这个部分flash将被更新,在其他更新方式(即只更新Application)的时候,不更新flash这个部分。

这个实现只需要将内部更新的flash access的范围进行设定即可,使用API void flash_set_access_limits (uint16_t start_row, uint16_t last_row, uint16_t md_row, uint16_t bl_last_row)。

2. 在SWD更新时跳过某一行。 Infineon提供了PPCLI进行自定义烧写,因为Infineon的HEX的校验(checksum)包括对每一行flash和整体flash。所以,如果在SWD烧写时不想要更新某一行,需要自定义时跳过相关的flash row,并且计算相对应的Checksum。相对应的API可以是:PSoC4_ProgramRow(IN rowID, nvector IN data)或者PSoC4_ProgramRowFromHex(IN rowID)进行更新,请不要使用标准参考代码里面的PSoC4_EraseAll()。

参考KBA:https://community.infineon.com/t5/Knowledge-Base-Articles/Programming-PSoC-3-PSoC-4-and-PSoC-5LP-MCU... 

使用手册:https://www.cypress.com/file/136431/download 

 

Best Regards,

Lisa

在原帖中查看解决方案

6 回复数
ShifangZ_26
Moderator
Moderator
Moderator
10 likes given 250 sign-ins 1000 replies posted

Hello ,

一般对于某一行flash特殊使用简单的处理办法有2种:(建议使用第一种)

1. 在SWD更新时,这个部分flash将被更新,在其他更新方式(即只更新Application)的时候,不更新flash这个部分。

这个实现只需要将内部更新的flash access的范围进行设定即可,使用API void flash_set_access_limits (uint16_t start_row, uint16_t last_row, uint16_t md_row, uint16_t bl_last_row)。

2. 在SWD更新时跳过某一行。 Infineon提供了PPCLI进行自定义烧写,因为Infineon的HEX的校验(checksum)包括对每一行flash和整体flash。所以,如果在SWD烧写时不想要更新某一行,需要自定义时跳过相关的flash row,并且计算相对应的Checksum。相对应的API可以是:PSoC4_ProgramRow(IN rowID, nvector IN data)或者PSoC4_ProgramRowFromHex(IN rowID)进行更新,请不要使用标准参考代码里面的PSoC4_EraseAll()。

参考KBA:https://community.infineon.com/t5/Knowledge-Base-Articles/Programming-PSoC-3-PSoC-4-and-PSoC-5LP-MCU... 

使用手册:https://www.cypress.com/file/136431/download 

 

Best Regards,

Lisa

只更新Application,是通过PSoC Programmer还是其他工具呢?

0 点赞
ShifangZ_26
Moderator
Moderator
Moderator
10 likes given 250 sign-ins 1000 replies posted

CCG5 SDK固件默认支持是I2C bootloader, Application的升级通过Ez-PD Configuration Utility.

0 点赞

 

是通过Utilities---->Upgrade Firmware升级Application吗?今天通过这个升级了,板子没有反映,也没重启,我断电重启后,里面运行的代码还是修改之前的

julius_yang_0-1665229932807.png

 

0 点赞
ShifangZ_26
Moderator
Moderator
Moderator
10 likes given 250 sign-ins 1000 replies posted

您提供的截图是升级MiniProg3这个编程工具。没有升级CCG5的固件。建议提前阅读使用手册。

Ez-PD Configuration Utility. Download link: https://www.infineon.com/cms/en/design-support/tools/configuration/usb-ez-pd-configuration-utility/ 

0 点赞

好的,了解了,谢谢

0 点赞