In our current implementation of the CDC ACM output, we use a blocking wait for the APP_USBD_CDC_ACM_USER_EVT_TX_DONE after writing to the cdc acm stack. We are using Teraterm to receive and print the data on the PC. We noticed that in particular when there's large amount of data, the Teraterm terminal will become overwhelmed, causing it to go out of sync with the nrf chip and printing garbage. To address this, we would like to use any available flow control mechanism.
Currently, we just put in a fixed delay on top of the wait-for-interrupt in order to stop Teraterm output from corrupting.
We read from this thread: https://devzone.nordicsemi.com/f/nordic-q-a/46217/nrf52840-usb-cdc-acm-baud-rate-question, that there's a RTS line we can check to see if the PC terminal application is ready. Can we simply use the app_usbd_cdc_acm_line_state_get method to access this state? Are there any other setup required (eg on PC side)?
Thank you.