Skip to main content
PKraj.1
Associate
Feb 4, 2022 9:27 PM UTC
Question

CDC USB receive with XMODEM

I'm using STM32F745. I would like to use the CDC USB to receive data from Tera Term using the XMODEM protocol. I can configure CDC_Receive_FS() to receive data for blocks of 64 bytes or less.  The procedure for this is well documented. XMODEM packets are 133 bytes. I can only reliably receive the first 64 bytes. It won't communicate at all if CDC_DATA_FS_MAX_PACKET_SIZE is increased beyond 64. How can I facilitate this?

This topic has been closed for replies.

4 replies

Pavel A.
Feb 5, 2022 12:02 AM UTC

CDC_DATA_FS_MAX_PACKET_SIZE is a constant, 64. It cannot be increased. Instead receive several packets.

PKraj.1
PKraj.1Author
Associate
Feb 6, 2022 7:02 PM UTC

The problem is that the subsequent packets are the same as the first. They never update.

Pavel A.
Feb 6, 2022 10:30 PM UTC

If you type characters in teraterm, do you receive them correctly on stm32 side?

PKraj.1
PKraj.1Author
Associate
Feb 7, 2022 12:16 AM UTC

Yes, for the first 64 bytes.