cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt Management

javadpoostini
Associate II
Posted on June 16, 2016 at 13:17

Hello Everyone

I am trying to run my code on stm32f4, with use of interrupt routines. I have an 9dof imu including mpu6050,hmc588,bmp058. So i am interfacing 3 EXTI rsubroutine to read imu and this has been successfully done. I also have gps module and pc rs232 interface to recieve data from user on pc. (usart tx is in while (1)). So i have 2 usart IRQ. 

The problem now, is with NVIC. EXTI routines preempt serial port routines so that i can not read gps absolutly and also rs232 (tx,rx) hangs after some time. 

What is the manner to manage interrupts? 

I have used two kind of coding and none of them has worked correctly as i expect;

1 - nvic_set()

2 - nvice settings (preemption and sub) while ibitializing peripherals.

How can i manage to avoid unwanted interrupt preemption?

What is the way of managing interrupts ? How can i learn more? 

Thanks .

1 REPLY 1
Amel NASRI
ST Employee
Posted on June 16, 2016 at 16:01

Hi M.J

I recommend you refer to the

http://www.st.com/content/ccc/resource/technical/document/programming_manual/6c/3a/cb/e7/e4/ea/44/9b/DM00046982.pdf/files/DM00046982.pdf/jcr:content/translations/en.DM00046982.pdf

(STM32F3, STM32F4 and STM32L4 Series Cortex®-M4 programming manual). It can help you to understand how to handle interrupts with Cortex-M4 products and provides more details about preemption as well as the management of NVIC.

-Mayla- 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.