cancel
Showing results for 
Search instead for 
Did you mean: 

USB OTG-HS (CDC) stopped showing up when NVIC was set to 1 (the rest were all 0)

keeratrajsingh
Visitor

I am using the Nucleo-H7A3ZIQ for a project, utilising the Communication Device Class of the USB OTG-HS. Everything was working well, then there was an issue that the timers stopped taking inputs with the USB configured, while they worked fine when USB wasn't used. Due to this, I started tinkering and set the NVIC preemption priority for the USB to 1 (all others were 0). This resulted in a lot of program crashes, and the USB CDC not recognised even by the OS.

It started working fine when I reset its priority. Any idea about this, and also the timers not taking inputs?

3 REPLIES 3
FBL
ST Employee

Hi @keeratrajsingh 

Would you attach minimum firmware project to narrow down the issue?

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.


keeratrajsingh_0-1747303639502.png

This is the current NVIC priority setup I have with me. Earlier it was all zeroes and just the USB as 1, which caused the USB not to be called. Was this because the other ISR's took so long that USB wasn't being called?

Also, while capturing timer inputs with interrupts, the interrupts are not firing. I am able to use polling for capturing the inputs. This only happens when I am using USB, interrupts work fine when not using USB.
I have attached the HAL source files and .ioc for more reference.

Hi @keeratrajsingh 

You didn't attach your main file. Check this article.

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.