cancel
Showing results for 
Search instead for 
Did you mean: 

Exti line 7 stop working after jumping to the application on stm32F030

u23
Senior
Posted on July 26, 2017 at 11:15

Hi,

After the jumping bootloader, the EXTI_line7 not work!

boot.c

            /* Test if user code is programmed starting from address 'APPLICATION_ADDRESS' */

            if (((*(__IO uint32_t*)FLASH_USER_START_ADDR) & 0x2FFE0000 ) == 0x20000000)

                {

                    /* Jump to user application */

                    JumpAddress = *(__IO uint32_t*) (FLASH_USER_START_ADDR + 4);

                    Jump_To_Application = (pFunction) JumpAddress;

      

                    /* Initialize user application's Stack Pointer */

                    __set_MSP(*(__IO uint32_t*) FLASH_USER_START_ADDR);

                    

                    __disable_irq();

                    

                    /* Jump to application */

                    Jump_To_Application();

                }

application.c

int main(void)

{

    unsigned long ulChk = 0;

    unsigned int     uiLen = 0;

    GPIO_InitTypeDef GPIO_InitStructure;

  uint32_t i = 0;

 

 RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);  // Clock not Reset   

 

   /* Relocate by software the vector table to the internal SRAM at 0x20000000 ***/  

   /* Copy the vector table from the Flash (mapped at the base of the application

     load address 0x08003000) to the base address of the SRAM at 0x20000000. */

  for(i = 0; i < 48; i++)

  {

            VectorTable[i] = *(__IO uint32_t*)(APPLICATION_ADDRESS + (i<<2));

  }

  /* Enable the SYSCFG peripheral clock*/

  RCC_APB2PeriphResetCmd(RCC_APB2Periph_SYSCFG, ENABLE);

    /* Remap SRAM at 0x00000000 */

  SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM);

/***************** Add your application code here   ***************************/

   /* Unlock the Flash Program Erase controller */

  FLASH_Unlock();

// main loop...

}   

I'm have add SYSCFG clock enabled prior to remapping the RAM, but EXTI line 7 not work!

thanks

1 ACCEPTED SOLUTION

Accepted Solutions
u23
Senior
Posted on November 17, 2017 at 10:01

I have solved!

it is necessary used the EXTI pin on port A. If bootloader and application is used, the EXTI pin only works if it is on port A.

It is necessary that EXTI pin is configured in boot code and in application code.

good job!

View solution in original post

2 REPLIES 2
u23
Senior
Posted on August 25, 2017 at 08:58

The exti line 7 is working if not used bootloather.

If loaded the same application code with bootloather the exti line 7 not working.

Suggestions

?

u23
Senior
Posted on November 17, 2017 at 10:01

I have solved!

it is necessary used the EXTI pin on port A. If bootloader and application is used, the EXTI pin only works if it is on port A.

It is necessary that EXTI pin is configured in boot code and in application code.

good job!