My config: using TM4C123BH, IAR v6.70, TI-RTOS 2.0.0.22, TivaWare 2.1.0.12573c
I'm using a custom bootloader based on TivaWare in my FLASH area 0x0000000-0x00001FFF. The application starts at 0x00002000. The boot up is working fine, the bootloader detects a valid application and starts the application with TI-RTOS. TI-RTOS also is working fine (I'm using GPIO, ADC, I2C Master, I2C Slave, Timers, Hwi and Swi, Semaphores, Events, Gates, 6 different Tasks). For firmware update I need to call the bootloader from my application. The command for firmware update is received by the I2C slave interface. I jump to the bootloader using the following code:
// We must make sure we turn off SysTick and its interrupt before entering
// the boot loader!
ROM_SysTickIntDisable();
ROM_SysTickDisable();
// Disable all processor interrupts. Instead of disabling them
// one at a time, a direct write to NVIC is done to disable all
// peripheral interrupts.
HWREG(NVIC_DIS0) = 0xffffffff;
HWREG(NVIC_DIS1) = 0xffffffff;
// Load the stack pointer from the bootloader's vector
__set_MSP( *((volatile uint32_t*)0x00 ));
// Return control to the boot loader. This is a call to the
// SVC UpdateHandler in the boot loader and should never return.
// If it does, very bad things will likely happen.
(*((void (*)(void))(*(uint32_t *)0x2c)))();
The bootloader call also works, it is displayed by a GPIO (LED). But the update handler using the I2C slave interface stucks. The I2C address byte is acknowledged, but further data will not acknowledged any I get a timeout.
If I start the bootloader update handler without TI-RTOS application, everything is working fine. So I guess, something must be disabled in the application before the bootloader is called. Any ideas?