I have a bootloader running on an LPC1752. This bootloader jumps to my main software after a few seconds.
This is already working for years! But recently we discovered a device that is not working properly because of a highter ambient temperature.
If the ambient is higher (~65Celcius) the bootloader starts, but on the moment it should switch to the main program it doesn't do anything. I can't connect using the jtag/swj debugger and really need to reset the device to start again.
If I flash my main program as start program instead of the bootloader the software does boot normally under the hot condition.
If the main software is already running before we get to the higher temperatures the devices runs as expected, meaning the problem is in the jump at line 39?
void NormalProgramCall(uint32_t *Address)
{
NVIC->ICER[ 0 ] = 0xFFFFFFFF ;
NVIC->ICER[ 1 ] = 0xFFFFFFFF ;
NVIC->ICER[ 2 ] = 0xFFFFFFFF ;
NVIC->ICER[ 3 ] = 0xFFFFFFFF ;
NVIC->ICER[ 4 ] = 0xFFFFFFFF ;
NVIC->ICER[ 5 ] = 0xFFFFFFFF ;
NVIC->ICER[ 6 ] = 0xFFFFFFFF ;
NVIC->ICER[ 7 ] = 0xFFFFFFFF ;
NVIC->ICPR[ 0 ] = 0xFFFFFFFF ;
NVIC->ICPR[ 1 ] = 0xFFFFFFFF ;
NVIC->ICPR[ 2 ] = 0xFFFFFFFF ;
NVIC->ICPR[ 3 ] = 0xFFFFFFFF ;
NVIC->ICPR[ 4 ] = 0xFFFFFFFF ;
NVIC->ICPR[ 5 ] = 0xFFFFFFFF ;
NVIC->ICPR[ 6 ] = 0xFFFFFFFF ;
NVIC->ICPR[ 7 ] = 0xFFFFFFFF ;
SysTick->CTRL = 0 ;
SCB->ICSR |= SCB_ICSR_PENDSTCLR_Msk;
SCB->SHCSR &= ~( SCB_SHCSR_USGFAULTENA_Msk | SCB_SHCSR_BUSFAULTENA_Msk | SCB_SHCSR_MEMFAULTENA_Msk ) ;
SCB->VTOR = ( uint32_t )Address ;
__set_MSP( Address[ 0 ] ) ;
( ( void ( * )( void ) )Address[ 1 ] )( ) ;
}