How to set OTP BOOT_SRC

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

How to set OTP BOOT_SRC

Jump to solution
578 Views
namht
Contributor III

Hi all,

I am using custom board of  MCU LPC54S016. I have a question: How to set bits of OTP BOOT_SRS of LPC54S016?  

thanhnambka_0-1737108870262.png

 

Thank all ./.

 

 

 
Labels (1)
0 Kudos
Reply
1 Solution
538 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi thanhnambka,

BOOT_SRC is at OTP bank 3, word 0. so the bankIndex = 3;  regIndex =0value parameter is the entire 32bit register ( 45.12.4.3 OTP memory bank 3, word 0 - Boot ROM control data ), see UM11060 Table 1108.LPC540xx OTP memory bank 3, word 0

Jun Zhang

View solution in original post

3 Replies
547 Views
namht
Contributor III

Hi Jun Zhang, Thank you for your response.

 

If i want set value of BOOT_src=0x1 (as image below):

thanhnambka_0-1737167080101.png

I must use function:

status_t OTP_ProgramRegister(uint32_t bankIndex, uint32_t regIndex, uint32_t value);

I must input 3 parameters: bankIndex = 3; and what is regIndexvalue parameters value to enter?

 

Thank you.

 

 

 

0 Kudos
Reply
539 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi thanhnambka,

BOOT_SRC is at OTP bank 3, word 0. so the bankIndex = 3;  regIndex =0value parameter is the entire 32bit register ( 45.12.4.3 OTP memory bank 3, word 0 - Boot ROM control data ), see UM11060 Table 1108.LPC540xx OTP memory bank 3, word 0

Jun Zhang

559 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi thanhnambka,

OTP is accessed with API. You can refer otp demo code under MCUXpresso SDK to know how to use OTP API. 

Function OTP_ProgramRegister, which calls otpProgramReg API, is to set OTP register. BOOT_SRC is at OTP bank 3, word 0, bit 10:9.

For more information about this register, see UM11060 45.12.4.3 OTP memory bank 3, word 0 - Boot ROM control data.

Please note, OTP is One-Time Programmable memory. That's to say, once OPT is written, it can't be written again. No matter you do system reset or not. Please double check your setting and make sure it is correct before programming OTP.

 

Hope this helps,

Jun Zhang