Skip to main content
Visitor II
February 4, 2022
Question

CDC USB receive with XMODEM

  • February 4, 2022
  • 3 replies
  • 1360 views

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.

    3 replies

    Super User
    February 5, 2022

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

    PKraj.1Author
    Visitor II
    February 6, 2022

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

    Super User
    February 6, 2022

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

    PKraj.1Author
    Visitor II
    February 7, 2022

    Yes, for the first 64 bytes.