Skip to main content
Visitor II
May 15, 2025
Question

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

  • May 15, 2025
  • 1 reply
  • 888 views

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?

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    May 15, 2025

    Hi @keeratrajsingh 

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

    Visitor II
    May 15, 2025

    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.

    Technical Moderator
    May 15, 2025

    Hi @keeratrajsingh 

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