Skip to main content
PKraj.1
Associate
February 4, 2022
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.
February 5, 2022

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

PKraj.1
PKraj.1Author
Associate
February 6, 2022

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

Pavel A.
February 6, 2022

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

PKraj.1
PKraj.1Author
Associate
February 7, 2022

Yes, for the first 64 bytes.