Quantcast
Viewing all articles
Browse latest Browse all 4909

General • USB poll?

Hi.

Is it possible to make the USB on the pico work in polling mode? I need to do some critical time measurements and the USB IRQs are messing up my routines.

I'm using an NMI and SysTick to trace intervals in the range of 10ns (I have the CPU overclocked to 200Mhz), I have a PIO program that rises an interrupt that is set as the NMI and I need to get the exact time, it works perfectly except when the USB triggers its interrupt, it looks like if there is an interrupt running triggering the NMI gets delayed, somehow introduces a random delay between 20 and 400ns (I have tested it, disabling the USB irq the measurements get perfect).

I also need the USB running as I could send an "abort" to stop the process so I can't disable the interrupt...

In other platforms is possible to use the USB in "polling" mode, instead of having interrupts the poll routine is called in a loop and that processes incomming/outgoing data. Is it possible to do it with the pico?

Cheers.

Statistics: Posted by Dr.Gusman — Sat Jun 08, 2024 9:52 pm



Viewing all articles
Browse latest Browse all 4909

Trending Articles