freedom k22fn

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

freedom k22fn

846 次查看
Donsnook
Contributor II

When trying the example  flash project the erase sector always return 0x20 why ???

0 项奖励
回复
4 回复数

657 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Don,

The routine will returned the FTFE_FSTAT value, the 0x20 means ACCERR bit is set.

When execute Erase Flash Sector Command, below situation will report ACCERR error:

Flash error.jpg


Wish it helps.
best regards
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

657 次查看
Donsnook
Contributor II

Ok the issue was that HSMODE was enable had to change to RUN mode

0 项奖励
回复

657 次查看
Donsnook
Contributor II

I check security state returns 1

I check flash protection registers all return 0xff

tried address 0x0 same result dest = 0

   REG_WRITE(pSSDConfig->ftfxRegBase + FTFx_SSD_FCCOB0_OFFSET, FTFx_ERASE_SECTOR);
    REG_WRITE(pSSDConfig->ftfxRegBase + FTFx_SSD_FCCOB1_OFFSET, GET_BIT_16_23(dest));
    REG_WRITE(pSSDConfig->ftfxRegBase + FTFx_SSD_FCCOB2_OFFSET, GET_BIT_8_15(dest));
    REG_WRITE(pSSDConfig->ftfxRegBase + FTFx_SSD_FCCOB3_OFFSET, GET_BIT_0_7(dest));
    REG_WRITE(pSSDConfig->ftfxRegBase + FTFx_SSD_FSTAT_OFFSET,FTFx_SSD_FSTAT_ERROR_BITS);
0 项奖励
回复

657 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Don,

The Flash security doesn't affect Flash operation, include erase flash sector.


Wish it helps.
best regards
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复