I'm using the Keil USB library to implement a CDC ACM driver (Keil Middleware v7.3.0) to send data from my LPC4330 to a linux host.
I'm sending an array of bytes to the host from the LPC4330.
The funtion USBD_CDC_ACM_WriteData() sends the data through, but changes all 0x0D(CR) bytes with 0x0A(LF).
Is there a way to disable this "feature", I would like to send through binary data and not have to convert everything to ASCII.
I'm using uVision 188.8.131.52.
/* Send packet to phytec */
(void)USBD_CDC_ACM_WriteData(0U, ffsk_packet_buff, 29);
I have a project that relies on USBD_CDC_ACM_WriteData() between the MCU and a Linux or Windows host, and I have never seen this translation happen. One packet type I send includes the value of an 8-bit counter -- if this translation were happening I'd be missing a count and I haven't seen that. Have you tried using Wireshark on the Linux host to see the USB packets as they arrive?
How are you opening the port on the Linux side? Linux may be doing the translation for you -- I recommend checking the terminal configuration.
I cleared the ICRNL input mode flag and that fixed my issue.
Maybe next time I'll read the man page like I should have form the start.
View all questions in Keil forum