Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: Problem in USB-CDC-UART bidirectional bridge

$
0
0
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.

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>