freedom k22fn

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

freedom k22fn

714 Views
Donsnook
Contributor II

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

0 Kudos
Reply
4 Replies

525 Views
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!
-----------------------------------------------------------------------------------------------------------------------

525 Views
Donsnook
Contributor II

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

0 Kudos
Reply

525 Views
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 Kudos
Reply

525 Views
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 Kudos
Reply