cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4-Discovery HS USB

atakan
Associate II
Posted on November 23, 2014 at 15:52

Hi all,

I want to convert the USB HID MOUSE demonstration example (from the board firmware package) into HIGH SPEED and be able to transfer 128Bytes in a single Xfer.

I changed the following places;

HID REPORT;

REPORT_SIZE (8)

REPORT_COUNT(128)

(report descriptor works properly under FS)

USBD_HID_CfgDesc;

wMaxPacketSize = 128

USBD_DeviceDesc;

bMaxPacketSize = 128

USBD_Init(&USB_OTG_dev,

            USB_OTG_HS_CORE_ID,

            &USR_desc,

            &USBD_HID_cb,

            &USR_cb);

HID_IN_PACKET                128

HID_OUT_PACKET             128

When i run, nothing happened on PC side. Its not detected.

Please help me on that matter.

Which settings i need to change?

#usb #stm32f4 #stm32f429-usb-hid #me-too #hs #discovery
5 REPLIES 5
Posted on November 23, 2014 at 16:01

Which settings i need to change?

Couple of defines and an external PHY?

USE_USB_OTG_HS USE_EMBEDDED_PHY

You could look at STM32F429I-DISCO examples, they use the HS
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
atakan
Associate II
Posted on November 24, 2014 at 22:14

Thanks Clive1.

From STM32F407 datasheet;

>  -USB 2.0 full-speed device/host/OTG controller with on-chip PHY

>  -USB 2.0 high-speed/full-speed device/host/OTG controller with

> dedicated DMA, on-chip full-speed PHY and ULPI.

This is the same as STM32F429I datasheet.

I've also tried STM32F429 examples, but there is no specific example for HS HID DEVICE. I think there is only one example which is OTG HOST. Is there an external PHY on that board?

Posted on November 24, 2014 at 22:40

The STM32F429I-DISCO does not have an external PHY, several of the STM32F4xx-EVAL boards do.

Without the PHY you'd be using the HS peripheral in FS mode.

There are a couple of third-party boards, including those from Olimex, that support both peripherals.

It would surprise me a lot there are no HID examples for the EVAL boards, but HID devices aren't my thing, I've gotten VCP and MSC example working on the STM32F429I-DISCO by paying attention to the pins used/configured, and the defines as mentioned above.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
himanshusharma
Associate II
Posted on December 21, 2015 at 09:36

Hi,

This is the same application I am working on, facing same issue.

Are you able to make device as HID and send receive data. stm32f407 get successfully init as USB HID device but not able to init stm32f429 as USB HID I tried to change core asUSB_OTG_HS_CORE_ID but not happening.

Project is written in CoIDE an attached

________________

Attachments :

Test_USB.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzkP&d=%2Fa%2F0X0000000bOx%2F8Zze6BYq4leRZQkuJY3DpU.3WyPaJlbvZaRR00CpXHs&asPdf=false
Posted on December 22, 2015 at 17:27

Unfortunately just slapping STM32F4-DISCO code into a project, and expecting it to work on the STM32F429I-DISCO is going to result in failure. As I have previously stated you are going to have to configure it to use the HS Core and pins, along with the Embedded PHY, which will result in FS operations through the HS Core.

Look at the USB examples provided for the STM32F429I-DISCO with a critical eye to what you need to adapt into your own code. There are perhaps half-a-dozen things that need to be correctly addressed.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..