cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 XMODEM using USB CDC Interface

jacob2
Associate II
Posted on February 03, 2017 at 17:57

I'm trying to implement an XMODEM file transfer through the USB CDC Interface on an STM32L4 processor in Full-Speed and seem to be having issues with XMODEM 132 byte packets getting split up and one of the middle packets getting resubmitted. I need to be able to NAK/ACK the XMODEM packets to keep the transfer going but this seems to sometimes mess up the submitting of the sub-packets causing me to get invalid data. Is there anyway to only trigger the CDC_Receive_FS function once all 132 bytes are received at the end point? Handling the separate packets from within the CDC_Receive_FS is causing problems because sometimes the broken up packets are being sent multiple times and there is no easy way of detecting a repeat.

I generated my code using the latest STM32 firmware for STM32CubeMX and am working in Keil.

#stm32-usb #usb-fs #usb-cdc #usb-vcp-stm32_usb-fs-device_lib #stm32l4
0 REPLIES 0