LPC55xx USB VCOM routines

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC55xx USB VCOM routines

125 Views
Marconi_
Contributor I

I am using the LPC5528 microcontroller for an audio application that requires sampling digital inputs at 100 kHz and processing them in real time.
To sample the signal, I use a timer that generates a trigger to the analog-to-digital converter. At the end of the conversion, an interrupt is generated by the analog-to-digital converter, whose service routine processes the data in real time.
The application includes a USB VCOM connection to a PC, but as soon as I connect the computer via USB, many samples are lost, even though the USB interrupt has a lower priority than the analog-to-digital converter.
It seems that the routines that manage the USB disable all interrupts to protect critical sections of the code. How do I solve the problem?

Labels (1)
0 Kudos
Reply
1 Reply

104 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Regarding your issue that the ADC lost data when the USB is working, I suppose that the core is overloaded.

in order to reduce the core workload, I suggest you use ADC FIFO and set the watermark of FIFO to maximum, in the ISR, you read the number of ADC results in FIFO, then read them in one ISR, in this way, you can reduce the ADC ISR frequency and reduce the core workload.

 

xiangjun_rong_0-1721886629414.png

 

 

Secondly, pls try to reduce the ADC triggering frequency so that the core workload can be reduced.

Hope it can help you

BR

XiangJun Rong

0 Kudos
Reply