完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我们知道集成ROM的CPU中有BOOT程序。如何调用呢?调用哪个函数?例如,检测PA0 = 0或者串口接收到一个更新命令时,如何调用rom中的boot程序。谢谢!
When performing an update via a serial port (UART0, SSI0, or I2C0), ConfigureDevice() is used to configure the selected serial port, making it ready to be used to update the firmware. Then, Updater() sits in an endless loop accepting commands and updating the firmware when requested. All transmissions from this main routine use the packet handler functions (SendPacket(), ReceivePacket(), AckPacket(), and NakPacket()). Once the update is complete, the boot loader can be reset by issuing a reset command to the boot loader 找到答案了!转载 Aha. I see now what you wanted me to see. ALL interrupts must be disabled. In hindsight, that makes perfect sense. I now disable every interrupt (including systick), then clear out the UART fifo before passing control to the ROM_UpdateUART() function. This works! MAP_IntMasterDisable(); MAP_SysTickIntDisable(); NVIC_DIS0_R = 0xffffffff; NVIC_DIS1_R = 0xffffffff; MAP_UARTConfigSetExpClk(UART0_BASE, ROM_SysCtlClockGet(), 115200, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE)); Delay(1000); //just a software delay i = UARTIntStatus(UART0_BASE, false); //get interrupt status (RAW interrupt status) UARTIntClear(UART0_BASE, (unsigned long)i); //clear interrupt status while(MAP_UARTCharsAvail(UART0_BASE))[ //empty the fifo i = MAP_UARTCharGetNonBlocking(UART0_BASE); ] Delay(1000); ROM_UpdateUART(); I know the delays are probably not necessary, but that's what worked for me. I do still sometimes get a failure during the flash programming from the LM Flash Programmer. In this case i'm SOL. I must go reprogram the board with the JTAG programmer. This is not an ideal solution for field updates. Is the LM Flash Programmer software reliable for in-the-field flash programming? I'm afraid of field programming failures that would leave the code erased. This is why I wanted to get around the auto-baud detect in the first place. |
|
相关推荐
1 个讨论
|
|
只有小组成员才能发言,加入小组>>
549 浏览 0 评论
1613 浏览 0 评论
2047 浏览 0 评论
为啥BQ7693003DBTR芯片在和BQ769X0盒子通讯时收不到信号?
1513 浏览 0 评论
DSP 28027F 开发板 XDS100v2调试探针诊断日志显示了 Error -150 (SC_ERR_FTDI_FAIL)如何解决
1337 浏览 0 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
1756浏览 29评论
2781浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
1723浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
1634浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
1645浏览 13评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-1 19:48 , Processed in 0.929121 second(s), Total 58, Slave 44 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
289