1 解答
二月 02, 2018
04:29 AM
问题描述:
我在使用TC275C芯片,发现在擦除pflash后内存并不是全0,个别bit位是1. 并且实际的非0位和在调试状态在UDE软件memory里的非0位并不完全一致。且每次擦除后,这些位是固定的。但这些位可以通 过写flash来写0,即这些擦除后的非0位是可以写0的。
问题的必要性:
在BootLoader工程里,需要校验APP应用程序的数据,会读到擦除后没有写数据的地址,从而引发ECC错误(trap bus error)。可以通过设置控制寄存器来屏蔽这个错误。
由于存在所述问题,因而在bootloader下载程序时,不能只校验求和APP程序数据,还需加和APP程序起始和终止地址之间的空白区域。
问题的处理:
1.每次擦除后,非0位的位置是固定的。
2.擦除后的非0位,是可以通过写命令来写0的。
3.通过使用ILLD库自带的校验函数IfxFlash_eraseVerifyMultipleSectors(dwSectorAddr, numSector);进行检验,检验结果是无错的(内存区域非全0则报错)。
主题:Re: [Case:xxx] 技术咨询:TC275C的flash擦除不干净
Dear Customer,
Thanks for your inquiry.
By default TC2xx uses “safety ECC”. This is the default setting and can better protects the data. The side effect is that you cannot directly read all-0 flash e.g. after erase because in this case TC2xx may report error due to special ECC handling. We suggest to use command “Verify Erased Logical Sector Range” to check if the flash is erased with “safety ECC” enabled. It means after issue this command, you wait until BUSY flag is gone, then it will check the EVER bit is set (not all 0) or not (all 0). For compatibility reason, you may also switch to “legacy ECC” mode.
Please refer to chapter “ Flash ECC” in user manual for more details.
Best regards,
Infineon Technologies
Tang, Support Engineer
19 回复数
二月 02, 2018
01:14 AM
首先我没用过275,Flash 的编程原理都是只能将 1 写为 0,而不能将 0 写为 1。擦除的过程就是把所有位都写为 1 的过程,应该都是1才对。是不是调试器的原因。
二月 02, 2018
04:29 AM
问题描述:
我在使用TC275C芯片,发现在擦除pflash后内存并不是全0,个别bit位是1. 并且实际的非0位和在调试状态在UDE软件memory里的非0位并不完全一致。且每次擦除后,这些位是固定的。但这些位可以通 过写flash来写0,即这些擦除后的非0位是可以写0的。
问题的必要性:
在BootLoader工程里,需要校验APP应用程序的数据,会读到擦除后没有写数据的地址,从而引发ECC错误(trap bus error)。可以通过设置控制寄存器来屏蔽这个错误。
由于存在所述问题,因而在bootloader下载程序时,不能只校验求和APP程序数据,还需加和APP程序起始和终止地址之间的空白区域。
问题的处理:
1.每次擦除后,非0位的位置是固定的。
2.擦除后的非0位,是可以通过写命令来写0的。
3.通过使用ILLD库自带的校验函数IfxFlash_eraseVerifyMultipleSectors(dwSectorAddr, numSector);进行检验,检验结果是无错的(内存区域非全0则报错)。
主题:Re: [Case:xxx] 技术咨询:TC275C的flash擦除不干净
Dear Customer,
Thanks for your inquiry.
By default TC2xx uses “safety ECC”. This is the default setting and can better protects the data. The side effect is that you cannot directly read all-0 flash e.g. after erase because in this case TC2xx may report error due to special ECC handling. We suggest to use command “Verify Erased Logical Sector Range” to check if the flash is erased with “safety ECC” enabled. It means after issue this command, you wait until BUSY flag is gone, then it will check the EVER bit is set (not all 0) or not (all 0). For compatibility reason, you may also switch to “legacy ECC” mode.
Please refer to chapter “ Flash ECC” in user manual for more details.
Best regards,
Infineon Technologies
Tang, Support Engineer
二月 08, 2018
01:51 AM
我去擦完不是固定的,那很难搞呀
二月 23, 2018
01:31 AM
?问题2:flash擦除后个别位非0
在调试或非调试状态,都发现flash中没有写入数据的应用程序区域中不是全0。即pflash擦除后,个别bit位确实非0. 由于存在所述问题,因而在bootloader下载程序时,不能只校验求和APP程序数据,还需加和APP程序起始和终止地址之间的空白区域。
程序研究中发现: 1.每次擦除后,非0位的位置是固定的;2.擦除后的非0位,是可以通过写命令来写0的。
在论坛和群里咨询了很多人,有几个同行业遇到了这个情况,但因为程序能正确执行,就没在意这个问题了。
后来在英飞凌官网咨询了技术支持工程师,得到的邮件答复说是ECC保护引起的,可以通过使用ILLD库自带的校验函数IfxFlash_eraseVerifyMultipleSectors(dwSectorAddr, numSector);进行检验。我进行了校验,检验结果是无错的(内存区域非全0则报错)。
二月 27, 2018
08:49 AM
楼主的问题都是chengeer大神解决的。