主题中讨论的其他器件:LAUNCHXL-F28069M
您好! 我的项目基于 INSTASPIN 实验室。 我采用了 lab1b 并添加了我的代码。 现在、我要将该程序加载到控制器的闪存中。 我的板基于 LAUNCHXL-F28069M。 因此、TRST、TDO 和 GPIO34上具有2.2k Ω 的下拉电阻。 在 TDO 和 GPIO34上的带子之后有910ohm 上拉电阻。 我的 GPIO34引脚配置为通用输入。 我认为我的项目中有必要的代码:
extern uint16_t *RamfuncsLoadStart, *RamfuncsLoadEnd, *RamfuncsRunStart;
#ifdef CSM_ENABLE
extern uint16_t *econst_start, *econst_end, *econst_ram_load;
extern uint16_t *switch_start, *switch_end, *switch_ram_load;
#endif
#endif
void System_Init()
{
#ifdef FAST_ROM_V1p6
uint_least8_t ctrlNumber = 1;
#endif
// Only used if running from FLASH
// Note that the variable FLASH is defined by the project
#ifdef FLASH
// Copy time critical code and Flash setup code to RAM
// The RamfuncsLoadStart, RamfuncsLoadEnd, and RamfuncsRunStart
// symbols are created by the linker. Refer to the linker files.
memCopy((uint16_t *)&RamfuncsLoadStart,(uint16_t *)&RamfuncsLoadEnd,(uint16_t *)&RamfuncsRunStart);
#ifdef CSM_ENABLE
//copy .econst to unsecure RAM
if(*econst_end - *econst_start)
{
memCopy((uint16_t *)&econst_start,(uint16_t *)&econst_end,(uint16_t *)&econst_ram_load);
}
//copy .switch ot unsecure RAM
if(*switch_end - *switch_start)
{
memCopy((uint16_t *)&switch_start,(uint16_t *)&switch_end,(uint16_t *)&switch_ram_load);
}
#endif
#endif
}
我调用的第一个函数是这个 System_init()。 我n`t 闪存定义。我不使用 CSM。 我将使用 F28069M.cmd 编译程序、作为链接器文件。 我测试了开关的几个组合- TRST 连接到编程器、而不是 GPIO34高电平和低电平。 没有影响。 微控制器上没有任何东西。 我出了什么问题? GPIO34上的偏离器是否有可能阻止在它上注册逻辑"1"? 电压低于3V (我认为是2.5V)? 我是否必须将 hal.c 中的 GPIO34配置为保留函数?
以下是我的整个代码:
e2e.ti.com/.../CNCRouter-simple-program-v08-11-2022.rar
有什么建议吗?
谢谢!