Other Parts Discussed in Thread: CONTROLSUITE, TMS320F28069, LAUNCHXL-F28069M
Hi,
I'm working on using the bootloader from controlSuite v151 for the TMS320F28069 (C:\ti\controlSUITE\device_support\f2806x\v151\MWare\boot_loader). Initially, it didn't build because a few statements were missing. To get it to build, I did the following:
- added the line #include <stdint.h> to beginning of hw_types.h
- added a prototype for MemCopy
- commented out line 56 of controlSUITE\device_support\f2806x\v151\MWare\boot_loader\Flash2806x_API_Config.h (#define CPU_RATE 12.500L ) because the same constant was defined in a different file.
The problem that I'm running into is that once DELAY_US(10) is called in the function ConfigureUSB(void), the processor resets back to main and then hangs in MemCopy. DELAY_US is a function from F2806x_usDelay.asm that needs to be moved from flash to RAM before it's called or else it'll cause the sort of error I'm seeing. Memcopy is being called before DELAY_US is, so the code should be getting moved from flash to RAM.
//*****************************************************************************
#pragma CODE_SECTION(main, "normal")
void main(void)
{
MemCopy((Uint16 *)&RamfuncsLoadStart, (Uint16 *)&RamfuncsLoadEnd, (Uint16 *)&RamfuncsRunStart);
//Application check and branch
AppCheck();
g_ulCommandFlags = 0;
#ifdef ENABLE_FAILSAFE
g_bFailsafe = false;
#endif
#ifdef BL_HW_INIT_FN_HOOK
BL_HW_INIT_FN_HOOK(void);
#endif
ConfigureUSB();
#ifdef BL_INIT_FN_HOOK
BL_INIT_FN_HOOK(void);
#endif
#ifdef ENABLE_WATCHDOG
WatchdogEnable();
#endif
UpdaterUSB();
while(1);
}
Thanks in advance!