V-USB CDC-ACM stuck with usbInterruptIsReady() = 0
Posted: Mon Feb 03, 2014 5:42 pm
Hi,
I'm trying to implement a CDC-ACM (CDC-232) using V-USB on a small atmega328p board. I've wrote my code inspired by cdc232.2011-06-24 archive from http://www.recursion.jp/avrcdc/.
It works fine in one direction but not in the other !
From gtkterm, I can send characters to the atmega328, and it is receiving it properly in the usbFunctionWriteOut() function.
The reverse direction is not working : as soon that one character is send to PC thru usbSetInterrupt() call in the uartPoll() function, the usbInterruptIsReady() funtion returns 0 forever blocking any further transmission to usbSetInterrupt().
To make sure it is not my own code that had something wrong, I've compiled the original cdc232.2011-06-24 archive, only changing the target CPU and the F_CPU, and I figured out it is behaving exactly the same way.
Notice that the receive pipe still working fine while the transmit is blocked.
Any idea ?
I'm trying to implement a CDC-ACM (CDC-232) using V-USB on a small atmega328p board. I've wrote my code inspired by cdc232.2011-06-24 archive from http://www.recursion.jp/avrcdc/.
It works fine in one direction but not in the other !
From gtkterm, I can send characters to the atmega328, and it is receiving it properly in the usbFunctionWriteOut() function.
The reverse direction is not working : as soon that one character is send to PC thru usbSetInterrupt() call in the uartPoll() function, the usbInterruptIsReady() funtion returns 0 forever blocking any further transmission to usbSetInterrupt().
To make sure it is not my own code that had something wrong, I've compiled the original cdc232.2011-06-24 archive, only changing the target CPU and the F_CPU, and I figured out it is behaving exactly the same way.
Notice that the receive pipe still working fine while the transmit is blocked.
Any idea ?