Dear Support,
we use a F28M35H52C1 at the TMDSDOCKH52C1 Kit. At the moment we are developing a bootloader for our main application. For the M3 CPU we are a the point that we can programm our main application via the bootloader and jump to the main application. (The C28 CPU is ignored at the moment)
In the main application we get a FaultISR directly after FlashInit or in FlashGainPump function. Leave this part out via the debugger the rest of the application seems to work. (testet communication via Uart). Before leaving the bootloader we disabled the interrupts and called FlashLeavePump().
Programming the main appilcation via CCS (6.0.1.00040) everything runs fine as it should.
Info about Jump to the main application:
Setting the _c_int00 address:
boot: load = 0x21a694 { -l rtsv7M3_T_le_eabi.lib<boot.obj>(.text) }
Jump from the bootloader:
int main(void) { ... Main_SpringeZuHauptprogramm(0x21a694 + 1); return 0; } static void Main_SpringeZuHauptprogramm(unsigned long address) { __asm(" mov sp, r0\n" // sp is now *address " bx r0\n" ); // jump to *address }
Flashinit routine:
void FlashUserInit() { Fapi_StatusType oReturnCheck; DCSMUnlockZone1CSM (&Zone1KEY); DCSMUnlockZone2CSM (&Zone2KEY); memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize); FlashInit(); FlashGainPump(); oReturnCheck = Fapi_initializeAPI(F021_CPU0_BASE_ADDRESS, 100); if(oReturnCheck != Fapi_Status_Success) return; // TODO Fehlermeldung oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0); if(oReturnCheck != Fapi_Status_Success) return; // TODO Fehlermeldung }
HWREG(SYSCTL_MWRALLOW) = 0xA5A5A5A5; SysCtlClockConfigSet(SYSCTL_USE_PLL | (SYSCTL_SPLLIMULT_M & 0xA) | SYSCTL_SYSDIV_1 | SYSCTL_M3SSDIV_1 | SYSCTL_XCLKDIV_4); and SysCtlPeripheralDisable(SYSCTL_PERIPH_WDOG1); SysCtlPeripheralDisable(SYSCTL_PERIPH_WDOG0); are called in the main init routine before FlashUserInit.
Since the the main application works without the bootoader, the malfunction must have something to with the bootloader.
Thanks for your help in advance
Mathias