Other Parts Discussed in Thread: LAUNCHXL-F28069M
Greetings! My project is based on INSTASPIN labs. So I took lab1b and added my code. So now I want to load this program to the FLASH memory of the controller. My board is based on LAUNCHXL-F28069M. So I have 2.2kohms pull down on TRST, TDO and GPIO34. 910ohm pull ups after the swith on TDO and GPIO34. My GPIO34 pin is configured as general purpuse input. I think I have the necessary code in my project:
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
}
The first function I call is this System_init(). I have FLASH defined.I don`t use CSM. I am compiling the program with F28069M.cmd as linker file. I tested several combinations of the switch - TRST connected to the programmer and not, GPIO34 high and low. No effect. There is nothing on the microcontroller. What am I doing wrong? Is it possible the devider on GPIO34 to prevent registering logical "1" on it? The voltage there is below 3V(2.5V i think)? Do i have to configure the GPIO34 in hal.c as a reserved function?
Here is my entire code:
CNCRouter simple program v08 11 2022.rar
Any suggestions?
Thanks!