AnsweredAssumed Answered

STM32F4xx HAL vs silicon USB endpoint numbers

Question asked by mcquaid.conor.001 on May 22, 2014
Latest reply on May 29, 2014 by Montassar BEN ROMDHANE

After much digging, I discovered that while the reference manual for STM32F4xx says you can have 3 IN endpoints, it fails to prominently specify that these can only be the endpoints numbered 1, 2 or 3.

The HAL library code allows the use of any endpoint number from 1 to 15. I was able to choose endpoint 6 in my code and it compiled and executed without complaint, though, obviously endpoint 6 remained silent.

Further digging revealed this caveat in the PCD Initialization Structure:
typedef struct
  uint32_t dev_endpoints;        /*!< Device Endpoints number.
                           This parameter depends on the used USB core.  
                           This parameter must be a number between Min_Data = 1 and Max_Data = 15 */   

I hope that my failure to R The FM might save someone else from making the same mistake that I did.

Unfortunately, my application needs to use endpoint 6 in order to match an installed base of drivers. I don't see a way to do that using STM32F4 parts, but if someone can show me a way, that would make my day.


-- Conor