2016-07-03 08:02 PM
In STM32F103,i use
USB_EPnR to config endpoint address,
e.g. I can config endpoint1 with adress 0x0a,so endpoint1 can communicate with host endpoint10。
But in STM32F407 i don‘t find where to config endpoint adress,only known in OTG_FS has 3 IN endpoint,i don’t how to set endpoint adress.
if these 3 endpoint only support adress 1,2,3
? Now,in my design, I need to communicate with endpoint8 of the host, how can i solve these problem?2016-07-04 02:25 AM
Hi a.wang,
Once the USB core is initialized, the upper layer can call the low level driver to open or close the active endpoint and start transferring data. The following two APIs can be used: HAL_StatusTypeDef HAL_PCD_EP_Open(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint16_t ep_mps, uint8_t ep_type) HAL_StatusTypeDef HAL_PCD_EP_Close(PCD_HandleTypeDef *hpcd, uint8_t ep_addr) ep_addr, ep_mps and ep_type are respectively the endpoint address, the maximum data transfer and transfer type. You find further information in the ''STM32cube USB device library'' -Hannibal-2016-07-04 08:40 PM
Hi wang,
USB ''Device'' engine on STM32F103 has capability to assign endpoint number exposed to the bus side for each endpoint. But on OTG_FS engine on F407, the endpoint number is fixed for each endpoint, 1, 2 or 3. The OTG_HS has also fixed EPs, 1,2,3,4,5.> Now,in my design, I need to communicate with endpoint8 of the host, how can i solve these problem? Revise the host code, so that it doesn't depend on a specific endpoint number. Instead, search the target endpoint using endpoint attributes (such as bulk OUT / interrupt IN on a specific class/subclass interface) ''Fixed endpoint number'' is a bad coding practice on USB host implementation, because it should cause such trouble as you've experienced, limited endpoint assignment on new device. Tsuneo2016-07-05 02:43 AM
Mature products,thus i cant
revise /(ㄒoㄒ)/~~In fact,my design is between host and divice . I must require data
when host communicating with device .On f103 ,the adress can be configed but when stm32 use as device,this usb can'tproduce IN token interrupt,which can be solve on stm32f4.
So I will try stm32f4 agnin , and only use 123 enpoint to communicate.If this cantsuccess,i must to use extern USB chips.
After all I think , on stm32f4 , endpoint adress cant be configed, which does notaccording with the USB2.0
specification.This can
Compatible with other devices becuase usually we can't revise other device but our design.
2016-07-05 02:54 AM