External interrupt not working when ran by secondary bootloader
Custom board based on STM32F030C8, application compiled with Keil. Using the HAL for initialization and runtime.
When compiled to run directly out of the flash, the EXTI for PB0 works. It is configured to generate interrupts for both edges and when the button connected to it is pressed or depressed, the ISR is ran. The application image is generated with Keil default scatter file.
When the very same application is compiled to be ran out of a secondary boot loader, EXTI simply does not run. The difference of this version is a customized scatter file, an extra assembly file with a MBR that is appended to the end of the image and an externally generated CRC that is checked by the BL on startup. The image starts at 0x80004000. The interrupt vector is copied to the first 48 words of the RAM by the BL and remapped to address 0 (because of the Cortex M0 limitation).
GPIO and EXTI registers have the same value for both application versions. But the corresponding bit in PR register is never set on the BL version.
The application has a second source of interrupt, from a UART and it is working normaly on the BL version. So is the systick interrupt.
Any hint of what I should look at to solve this issue?
Thanks in advance.
