Part Number:LAUNCHXL-F28027Other Parts Discussed in Thread:DRV8301, MOTORWARE
motorware 的例程Lab01b ,launchpad XL TMS320F2802x 接usb连电脑仿真模式,程序中的两个使能位直接在头文件中改成使能了,程序可以运行(控制DRV8301接无刷电机,电机能转),程序烧写过后,拔出USB,重新上电,程序不运行。
请问这是什么原因,启动三个拨码开关都是接on,应该是flash启动
Green Deng:
你好,你的程序是烧写到flash中的吗?例程本身是烧写ram的,断电丢失,要修改为flash运行的
,
Yao Wei:
cmd文件如下:BEGIN指向flash,codestart 指向 BEGIN。应该是flash启动,拨码开关也拨到高电平,指向flash启动。为什么不接仿真器 上电不运行?
MEMORY{ PAGE 0: /* Program Memory */ OTP : origin = 0x3D7800, length = 0x000400 /* on-chip OTP */ CSM_RSVD : origin = 0x3F7F80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */ BEGIN : origin = 0x3F7FF6, length = 0x000002 /* Part of FLASHA. Used for "boot to Flash" bootloader mode. */ CSM_PWL_P0 : origin = 0x3F7FF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
IQTABLES : origin = 0x3FE000, length = 0x000B50 /* IQ Math Tables in Boot ROM */ IQTABLES2 : origin = 0x3FEB50, length = 0x00008C /* IQ Math Tables in Boot ROM */ IQTABLES3 : origin = 0x3FEBDC, length = 0x0000AA /* IQ Math Tables in Boot ROM */
ROM : origin = 0x3FF27C, length = 0x000D44 /* Boot ROM */ RESET : origin = 0x3FFFC0, length = 0x000002 /* part of boot ROM */ VECTORS : origin = 0x3FFFC2, length = 0x00003E /* part of boot ROM */ FLASHB_D : origin = 0x3F0000, length = 0x006000 /* on-chip FLASH B, C and D */ D_FLASHA : origin = 0x3F6000, length = 0x001F80 /* on-chip FLASH A */ P_RAML0 : origin = 0x008000, length = 0x000980 /* on-chip PRAM block L0 */
PAGE 1 : /* Data Memory */
RAMM0_M1 : origin = 0x000000, length = 0x000600 /* on-chip RAM block M0 + M1. 0x600 to 0x800 reserved for InstaSPIN */ D_RAML0 : origin = 0x008980, length = 0x000680 /* on-chip DRAM block L0 */}
SECTIONS{ /* Allocate program areas: */ .cinit : > FLASHB_D PAGE = 0 .pinit : > FLASHB_D, PAGE = 0 .text : > FLASHB_D PAGE = 0 codestart : > BEGIN PAGE = 0 ramfuncs : LOAD = FLASHB_D, RUN = P_RAML0, LOAD_START(_RamfuncsLoadStart), LOAD_END(_RamfuncsLoadEnd), RUN_START(_RamfuncsRunStart), PAGE = 0
,
Green Deng:
你好,看一下这个帖子,里面介绍得很详细如何将lab更改为flash boot。因为这是个大工程,所以需要更改的地方挺多的,不只是更改cmd和预定义。
https://www.ti2k.com/wp-content/uploads/ti2k/DeyiSupport_C2000_launchxl-f28069m-instaspin-on-f28069m-launch-pad-can-not-boot-from-flash
,
Yao Wei:
是电路的问题 ,我测了一下TRST引脚上的电压,在不连仿真器的情况下也有3.3V电压。把相应的拨码开关拨到另一端。程序可以独立运行了。说明launchpad硬件有缺陷。
谢谢您的答复!