USB CDC example has flaws

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

USB CDC example has flaws

514 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rjm on Thu Oct 15 07:25:26 MST 2015
today, I tested "usbd_rom_cdc" Example for LPC1549.

The code works well, demonstrating echoing characters that are typed in a terminal emulator that connects to the target via a CDC-ACM virtual COM-port.

However, when I send a file from the terminal emulator, data loss occurs.
It has been found out that the design of the buffer structure, where data is buffered into an interrupt routine and unbuffered into a function loop at the main loop level is not OK. It would have been better when the buffer structure was designed à la fifo, in order to ensure no data loss. Under such circumstances, the code could be reused in own applications without pain.

In the situation "as is", the appropriate code segments aren't readable well, and the small portions of interrupt disable aren't necessary, too, when the buffer structure would have been implemented well.
Labels (1)
0 Kudos
Reply
1 Reply

366 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by abonent on Wed Dec 30 13:25:54 MST 2015
This looks familiar to me
https://www.lpcware.com/content/forum/please-help-me-understand-lpcopen-cdc-example
0 Kudos
Reply