In my application the LPC4353 receives ADC samples from an external chip every 4 ms. I would like to buffer and stream this data over USB using interrupts so as to not interfere with the operation of the rest of my code.
As a starting point, I'm using the usbd_rom_bwtest example program. There are a few things that I don't understand in this program:
In function bwtest_USB_Prog_DTD the device transfer descriptor (dTD) struct array is initialised. Each buffer pointer page points to a 4kB chunk of RAM. 5 buffer pointers * 4 kB = 20 kB. Why do we need to loop around 8 times? All ep_TD[i].buffer0 point to the same memory location.
If I understand correctly, the IOC bit is set, so an interrupt should fire whenever each dTD has transmitted. Where is this interrupt serviced?
Thanks in advacnce for answering my questions,