2015-08-14 12:54 AM
HW board is stm32f429I-Discovery (MCU: stm32f429ZIT6).
I use STM32Cube MX V4.9 and stm32f429 firmware package V1.7 to generate source code of USB CDC function. GUI select device_only mode, and HSE to external 8MHz crystal, and configure USB clock to 48MHz, CPU: 168MH.
After I increase the heap size in stm32f4xxx_icf, then I can enumerate CDC successfully and TX(device to PC) characters continuously.
But, the issue I met is RX(PC to device) only can do once. RX IRQ won't come again, even TX still works after that.
anyone met some issue? any thought to figure it out?
Thank you,I check some internal control variables, such hpcd_USB_OTG_HS (Lock is HAL_UNLOCK, state is HAL_PCD_STATE_READY)
==RX call stack==
USBD_CDC_DataOut()
USBD_LL_DataOutStage()
HAL_PCD_IRQHandler()
2015-08-14 01:26 PM
Hi,
I had the same issue. You have to manually call the receive function again to receive more data:static int8_t CDC_Receive_HS (uint8_t* Buf, uint32_t *Len){ /* USER CODE BEGIN 11 */ USBD_CDC_ReceivePacket(hUsbDevice_1); return (USBD_OK); /* USER CODE END 11 */ }
Regards,
Robert
2015-08-16 10:46 PM
yes, it really works. Thanks a lot.