Skip to main content
Associate
Solved

STM32U575xx USBX CDC ACM only transmits less than 8 bytes

I am having issues with transmitting more than 8 bytes of data. If I transmit 12345678 everything works and I can see the data on my serial monitor. However if I transmit 123456789, then I do not get anything on the serial monitor. I have enabled the ZLP define and commented it out but still no lock. What am I not setting correctly here?

 

 

HGT8721Best answer
Associate

Found the issue

This was set to 8U

#define USBD_CDCACM_EPINCMD_FS_MPS 8U

However in CubeMX I set it to 64U. So not to sure why it did not update that value….

Solution is therefore below found in the ux_device_descriptors.h

#define USBD_CDCACM_EPINCMD_FS_MPS 64U

7 replies

ST Technical Moderator

Hi ​@HGT8721 

Can  you share the FIFO configuration assigned to that IN endpoint?

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
HGT8721Author
Associate

Can you assist in letting me know where  I can find this?

ST Technical Moderator
To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
HGT8721AuthorBest answer
Associate

Found the issue

This was set to 8U

#define USBD_CDCACM_EPINCMD_FS_MPS 8U

However in CubeMX I set it to 64U. So not to sure why it did not update that value….

Solution is therefore below found in the ux_device_descriptors.h

#define USBD_CDCACM_EPINCMD_FS_MPS 64U

Andrew Neil
Super User

in CubeMX I set it to 64U. So not to sure why it did not update that value….

Did you make sure to hit ‘Enter’ (or Tab) after editing the value?

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
HGT8721Author
Associate

Yes I did, because I also changed the Thread size stack and that did update. Very strange.