Part Number:TMS320F28035Other Parts Discussed in Thread:C2000WARE
您好。
我在做dsp的bootloader,自己写的引导程序,把app程序编程到相应位置后,跳转到app,但是bootloader中使用的外设没有恢复到默认状态。
我该怎么做才能使外设恢复到默认状态?
Susan Yang:
user5860441 说:但是bootloader中使用的外设没有恢复到默认状态
请问您现在使用的是哪种方式?在C200ware内有SCI的例程
C2000Ware\device_support\f2803x\examples\c28\f2803x_flash_kernel
在TRM中,您可以看一下 2.2.21 ExitBoot Assembly Routine
https://www.ti.com/lit/ug/sprui10/sprui10.pdf
您是否使用了
;———————————————–; _ExitBoot;———————————————–;———————————————–;This module cleans up after the boot loader;; 1) Make sure the stack is deallocated.; SP = 0x400 after exiting the boot; loader; 2) Push 0 onto the stack so RPC will be; 0 after using LRETR to jump to the; entry point; 2) Load RPC with the entry point; 3) Clear all XARn registers; 4) Clear ACC, P and XT registers; 5) LRETR – this will also clear the RPC; register since 0 was on the stack;———————————————–
_ExitBoot:
,
user5860441:
没有使用ExitBoot,怎么在C程序中调用这个汇编?ExitBoot();这样不行啊。
,
user5860441:
我修改了例程中的Exit_Boot.asm文件,只取ExitBoot函数 ,并定义在text段,在C中extern ,还是说未定义
,
Susan Yang:
user5860441 说:怎么在C程序中调用这个汇编?
抱歉,对汇编也不是很了解。但是从例程来看,是在cmd内定义了.InitBoot,而后在汇编中通过
; Cleanup and exit. At this point the EntryAddr; is located in the ACC register BF _ExitBoot,UNC
来实现的
TI中文支持网




