Hi Clemens, Thanks for your reply. I agree it is better to use a ring buffer in both direction. But I think there must be some other problem. I added to some code to simulate a ring buffer: switch (USB_getConnectionState()) { ...... } // Relay data to UART if there are any for(i = 0; i < count; i++) { //while(GPIO_getInputPinValue(GPIO_PORT_P4, GPIO_PIN2)); USCI_A_UART_transmitData(USCI_A1_BASE, dataBuffer[i]); } Not sure why, but accessing dataBuffer, the array used to store data received from USB-CDC, makes MSP430 not recognized by PC. Changing dataBuffer to some dummy array seems work fine.
↧