2025-05-15 1:53 AM
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?
2025-05-15 2:46 AM
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.
2025-05-15 3:11 AM - edited 2025-05-15 3:12 AM
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.
2025-05-15 8:14 AM - edited 2025-05-15 8:23 AM
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.