STM32 Evaluation Tools

Modify settings and columns
STM32 Discovery Kit, STM32 Nucleo, STM32 Eval Board
Share Discussion
Started: 5/13/2013 11:10 AM
  Posts : 28
USART interrupt problem
Hi guys, i've a problem with USART communication using interrupts.
Using only USART device, the communication works correctly.
When i try to using the usart device with some other timers interrupt routines with timers about 100 msec seems that these routines blocks the USART.

How can i handle the interrupt priority vector?

Now i use a global NVIC structure and set all the priority value to 0 but the USART priority is set to 4. But don't works.


Share Post
Posted: 5/13/2013 1:51 PM
  Posts : 11702
You should look at what you're doing with the Priority Grouping, and and Preemption Priority.

Consider if you're other interrupts are hogging too much time, or spinning in wait loops.

Are you using an RTOS?
Share Post
Posted: 5/14/2013 11:15 AM
  Posts : 28

Hi Clive, i'm using a cortex m0 microcontroller and in Core_cm0.h file there are no priority group definitions, differently from others microcontrollers like cortex m3.
My only option is to set a priority value from 0 to 3.
Well, i've set up the usart priority to 3 and other priorities to 0, but nothing seems to change.

About the OS, i use windows 7 with IAR ide. It isn't real time.

Tags: no nvic priority group
Share Post
Posted: 5/14/2013 11:35 AM
  Posts : 11702
Sorry the M0 thing wasn't clear from your initial post, and I'm not tracking your part usage. That would be easier if the forum permitted a view of your profile to actually show your posts rather than simple a count of them.

Having a timer interrupt running at 10 Hz (100 ms) honestly doesn't seem like a high loading, unless you have the processor running very slowly, or it's dwelling in there for a long time. You should probably evaluate what you're doing in that timer interrupt, and perhaps profile it via a GPIO pin so you can see how long it runs for.

The USART doesn't have a HW FIFO, so figure you need to service it within a 10-18 baud clock window.
Share Post

Browse Private Forums

NOTE: these forums are exclusive for users of this Extranet!)