cancel
Showing results for 
Search instead for 
Did you mean: 

Updated firmware(through usb pendrive) hangs

kumarmohitmm
Associate

 I am working on a project in which i have to upgrade the firmware using a usb key on stm32f07 discovery board. the firmware upgrade is successful and some blinky codes are working. but when i upload the code with sd card driver and usb host driver with two or more external interrupts the firmware upgrade is successful as soon as the interrupt occurs the microcontroller hangs.

2 REPLIES 2

Hangs where?

Perhaps check the HardFault_Handler and Error_Handler loops, or have them output actionable data.

Check Vector Table address setting in SCB->VTOR

Make sure interrupts are enabled, and that you have not transferred control from within an interrupt or callback.

Make sure the application is ready to handle whatever interrupt sources you have active.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
kumarmohitmm
Associate

Microcontroller hangs if i initialize the usb msc host and also hangs while mounting an sd card, function(f_mount). and also hangs on an external interrupt.

 if I do not initialize usb msc host or dont use f_mount the program works fine.

may be this problem is due to the interrupts, but f_mount is not working on interrupt.

/*external interrupt code*/

void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)  ////////////interrupt//////////////////////////

{

  if((int_i>0)&&(int_i<9))             ////////////if((int_i>0)&&(int_i<9))

{

if(HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_15)==1)

{

int_d = int_d>>1;

int_d = int_d|0x80;

}

if(HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_15)==0)

{

int_d>>=1;

}

}

++int_i;

if(int_i>=11)

{

++int_j;

 int_i=0;

temper[int_j] = int_d;

int_d=0;

   

}

}