Hi,
I am trying to update bootloader code from the main app. Before erasing the bootloader flash sectors, I disable all interrupts and enable them again after erasing the bootloader flash sectors. However, the MPU resets when it tries to send command over I2C. The debugger first says "running" then "running - a reset occured" and "running" again, When I suspend the code, it says "break at address 0x4 with no debug information available, or outside of program code."
I2C and some other peripherals use DMA.
Another thing is that, when I erase the whole flash and load only the main app, it crashes as soon as it sends the first I2C command.
For some reason the main app needs the data in the first sector.
What causes this problem?
Below you can find the linker file content:
MEMORY { VECTORS (X) : origin=0x00060000 length=0x00000020 vfill = 0xffffffff FLASH0 (RX) : origin=0x00060020 length=0x000DFFE0 vfill = 0xffffffff STACKS (RW) : origin=0x08000000 length=0x00001500 RAM (RW) : origin=0x08001500 length=0x0002EB00 } SECTIONS { .intvecs : {} > VECTORS flashAPI: { .\source\Fapi_UserDefinedFunctions.obj (.text) .\App\source\bl_flash.obj (.text) --library= "c:\ti\Hercules\F021 Flash API\02.01.01\F021_API_CortexR4_BE.lib" (.text, .data) } palign=8 load = FLASH0, run = RAM, LOAD_START(apiLoadStart), RUN_START(apiRunStart), SIZE(apiLoadSize) .TI.ramfunc : {} load = FLASH0, run = RAM, LOAD_START(ramLoadStart), RUN_START(ramRunStart), SIZE(ramLoadSize) .text : {} > FLASH0 .const : {} > FLASH0 .cinit : {} > FLASH0 .pinit : {} > FLASH0 .bss : {} > RAM .data : {} > RAM .sysmem : {} > RAM }
Regards,
Cihan