Priorities on STM32 (USB, SD, EXTI...)
Hi,
please help me figure out priorities in my project.
So, I'm using:
- SDIO 4 bit + DMA
- USB Composite Device = CDC + MSC with VBUS detection on PA9 pin.
I configured PA9 as EXTI on Rising/Falling edge. For now i just want to light a diode when USB conection is detected. It works on simplier project with just USB device CDC.
My priorities:
- SDIO global interrupt - Preemption priority 1
- DMA2 stream3 and stream 6 global interrupt - Preemption priority 2
- USB OTG FS global interrupt - Preemption priority 5
All sub priorities are 0.
I tried giving EXTI9_5 (PA9 pin) preemption priority from 0 to 6, and also preemption priority 5 with subpriority 1.
I know that the higher number it is, the lower priority it gets. My guess is that EXTI should have the last priority, but I'm not sure.
My MCU is STM32F407VG.
Thanks, and have a nice day!
