Programming the Flash Configuration Field (FCF) at firmware

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

Programming the Flash Configuration Field (FCF) at firmware

347 Views
wane
Contributor I

Hello,

I'm examining the best way to turn on secure the debugger port at firmware level.
As you know, default value of values of the backdoor key and other configuration field as follows.
0x400..0x407: 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
0x408..0x40F: 0xFF 0xFF 0xFF 0xFF 0xFE 0xFF 0xFF 0xFF

For change FCF values, can I program the FCF value without sector erase?
Because all bits have 1's excepting FSEC|SEC data, I have tried this way with successful.
Is this way can make a ECC problem (bricking)?
Or sector erase step must be done before programming?
Is there any other way of program FCF to recommend?

 

Regards,

0 Kudos
Reply
1 Reply

302 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@wane

1. The FCF configuration can be modified in the startup file, so users don't need to use FTFC instructions to erase and rewrite the FLASH in the code.

Senlent_0-1776421173803.png

2. If you want to modify the FCF in the application code, it's recommended that you erase it first. Secondary modifications to the FCF may pose risks, such as the ECC error you mentioned.

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2352355%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EProgramming%20the%20Flash%20Configuration%20Field%20(FCF)%20at%20firmware%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2352355%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI'm%20examining%20the%20best%20way%20to%20turn%20on%20secure%20the%20debugger%20port%20at%20firmware%20level.%3CBR%20%2F%3EAs%20you%20know%2C%20default%20value%20of%20values%20of%20the%20backdoor%20key%20and%20other%20configuration%20field%20as%20follows.%3CBR%20%2F%3E0x400..0x407%3A%200xFF%200xFF%200xFF%200xFF%200xFF%200xFF%200xFF%200xFF%3CBR%20%2F%3E0x408..0x40F%3A%200xFF%200xFF%200xFF%200xFF%200xFE%200xFF%200xFF%200xFF%3C%2FP%3E%3CP%3EFor%20change%20FCF%20values%2C%20can%20I%20program%20the%20FCF%20value%20without%20sector%20erase%3F%3CBR%20%2F%3EBecause%20all%20bits%20have%201's%20excepting%20FSEC%7CSEC%20data%2C%20I%20have%20tried%20this%20way%20with%20successful.%3CBR%20%2F%3EIs%20this%20way%20can%20make%20a%20ECC%20problem%20(bricking)%3F%3CBR%20%2F%3EOr%20sector%20erase%20step%20must%20be%20done%20before%20programming%3F%3CBR%20%2F%3EIs%20there%20any%20other%20way%20of%20program%20FCF%20to%20recommend%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ERegards%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2352918%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Programming%20the%20Flash%20Configuration%20Field%20(FCF)%20at%20firmware%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2352918%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22mailto%3AHi%40wane%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EHi%40wane%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E1.%20The%20FCF%20configuration%20can%20be%20modified%20in%20the%20startup%20file%2C%20so%20users%20don't%20need%20to%20use%20FTFC%20instructions%20to%20erase%20and%20rewrite%20the%20FLASH%20in%20the%20code.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Senlent_0-1776421173803.png%22%20style%3D%22width%3A%20700px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Senlent_0-1776421173803.png%22%20style%3D%22width%3A%20700px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F382752i0A56954D2044DEE6%2Fimage-dimensions%2F700x418%3Fv%3Dv2%22%20width%3D%22700%22%20height%3D%22418%22%20role%3D%22button%22%20title%3D%22Senlent_0-1776421173803.png%22%20alt%3D%22Senlent_0-1776421173803.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E2.%20If%20you%20want%20to%20modify%20the%20FCF%20in%20the%20application%20code%2C%20it's%20recommended%20that%20you%20erase%20it%20first.%20Secondary%20modifications%20to%20the%20FCF%20may%20pose%20risks%2C%20such%20as%20the%20ECC%20error%20you%20mentioned.%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E