Hi guys,
On stm32f723, I am using otg_hs controller with internal hs-phy. My application enumerates as a CDC class device (virtual com port). I am able to do highspeed transfers using chnWrite(). Recently there was a case where we need to slow the physical interface down. So I changed otg_dcfg_dspd = DCFG_DSPD_HS_FS. This would enable hs-phy to negotiate with the host to communicate using full-speed protocol. After the change, the device would not enumerate. After a bit of effort, I realized, by changing MaxPacketSize on Interrupt_request_ep to 64 (from 512), it would enumerate. The interval on that end-point is set to 0xff. So my first query
1. Would anyone know if there is any such limit of packet size on interrupt_request_ep?
After the change, the device now enumerates but still I am not able to transfer big chunks of data. ChnWrite() after a few attempts just sits idle. I have declared three serial_usb buffers. I see data is present in all three of them. 'bcounter' field in obqueue is 0.
2. What is the best way to troubleshoot this issue ?
Thanks,
AQ
Using usb fullspeed on highspeed phy (stm32f723)
- sabdulqadir
- Posts: 49
- Joined: Fri Mar 23, 2018 7:29 pm
- Has thanked: 13 times
- Been thanked: 4 times
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: Using usb fullspeed on highspeed phy (stm32f723)
Hi,
I never tested this scenario, probably there is something in the USB2 standard, 64 bytes could be a limit at that speed.
What is the buffers size? apparently the buffers are full and the serial_usb is not emptying them like it is supposed to do, it is like the driver does not call sduDataTransmitted().
Giovanni
I never tested this scenario, probably there is something in the USB2 standard, 64 bytes could be a limit at that speed.
What is the buffers size? apparently the buffers are full and the serial_usb is not emptying them like it is supposed to do, it is like the driver does not call sduDataTransmitted().
Giovanni
Re: Using usb fullspeed on highspeed phy (stm32f723)
sabdulqadir wrote:Hi guys,
After a bit of effort, I realized, by changing MaxPacketSize on Interrupt_request_ep to 64 (from 512), it would enumerate. The interval on that end-point is set to 0xff. So my first query
1. Would anyone know if there is any such limit of packet size on interrupt_request_ep?
You need to set the max packet size on both your CDC data descriptor and the endpoint to 64 bytes. Did you change both? If you have that set to 512 but the descriptor configured for 64, that's a recipe for undefined behavior since the buffer will never fill.
- sabdulqadir
- Posts: 49
- Joined: Fri Mar 23, 2018 7:29 pm
- Has thanked: 13 times
- Been thanked: 4 times
Re: Using usb fullspeed on highspeed phy (stm32f723)
Thanks mck for the help and taking time to reply.
You are right, i did finally realize that after few hit and miss trials
Thanks,
AQ
You are right, i did finally realize that after few hit and miss trials
Thanks,
AQ
Who is online
Users browsing this forum: No registered users and 7 guests