您好:
使用外部pin输入状态来切换BOOT_CFG[]的配置会占用很多IO口,这些IO口如果接了外设,在上电时有可能改变了BOOT_CFG[]的配置,导致内核不能启动,因此我想关闭这个功能,查看手册发现,需要设置BT_FUSE_SEL = 1,但是我在程序中设置 SRC->SBMR2 |= SRC_SBMR2_BT_FUSE_SEL_MASK; 发现该寄存器的值并不会改变,它是一个只读寄存器
/** SRC - Register Layout Typedef */
typedef struct {
__IO uint32_t SCR; /**< SRC Control Register, offset: 0x0 */
__I uint32_t SBMR1; /**< SRC Boot Mode Register 1, offset: 0x4 */
__IO uint32_t SRSR; /**< SRC Reset Status Register, offset: 0x8 */
uint8_t RESERVED_0[16];
__I uint32_t SBMR2; /**< SRC Boot Mode Register 2, offset: 0x1C */
__IO uint32_t GPR[10]; /**< SRC General Purpose Register 1..SRC General Purpose Register 10, array offset: 0x20, array step: 0x4 */
} SRC_Type;
我尝试修改他的属性,改为__IO uint32_t SBMR2; 但是仍然不能修改这个寄存器。我应该怎么在程序中修改这个寄存器?
MCUBootUtility在恩智浦官方EVK上测试UART/USB一键连接都很稳定,不确定你们的板子在硬件设计上有什么不同,如果一键连接报错,可以考虑不勾选“”一键连接“,然后多次点击Connect to ROM按钮进行连接。
Hi main i,
非常感谢使用NXP产品,很高兴为你提供技术支持!
首先,在SBMR2寄存器中的BT_FUSE_SEL位只是Fusemap中的BT_FUSE_SEL位镜像,所以你操作SBMR2寄存器是不会改变Fusemap内的值,你需要做的是改变Fusemap中的BT_FUSE_SEL位。
对于改变Fusemap中的位,我建议现将RT进入到Serial Downloader 模式,然后与NXP-MCUBootUtility连接,在此工具中已提供图形界面操作Fusemap中的位,非常容易。
关于Fusemap,我也建议你可以浏览RT文档的第21章来详细了解。
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
您好:
谢谢您的回复,我查看 博客 https://www.cnblogs.com/henjay724/p/9108176.html 发现里面有提到可以在application里面通过OCOTP驱动程序来修改FUSE ,是否可以提供对应的驱动程序Demo呢? RT1064可以成功使用USB口对FUSE进行更改,RT1052却不能使用USB口对FUSE进行更改(点击链接ROM之后,就没有HID设备了,用的W25Q128的NOR Flash),而且RT1052/RT1064在使用串口进行连接时都发生了错误。我们的产品不需要USB口的,而且进行小批量时需要一个一个修改,能不能在application中修改FUSE?
RT1052 使用USB口 连接不上图
RT1064 使用串口1 连接不上图
RT1064 使用串口1 连接不上
Hi main i,
感谢回复。
请参考SDK library中的OCOTP例程。
SDK library:
https://mcuxpresso.nxp.com/en/welcome
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------