cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f429 Discovery vcp with STM32CubeMX drivers?

renasis
Associate II
Posted on December 22, 2014 at 07:06

Hello,

Does anybody have a working vcp (usb cdc) project on a STM32F429 Discovery board using the stm32cubemx(hal) drivers? If so, could you send it to me? Just trying to get Windows 7 to recognize the vcp. I created a project in the latest version of the STM32CubeMX(4.5.0), compiled(w/Keil 5.12..cube .ioc attached), loaded to board, but it does not work(see ioc attached). I have the older version of a vcp project, based on the non HAL drivers (so I know it works with the proper code).

Thanks,

-jimmy

#stm32f429-discovery-vcp-usb-cdc
2 REPLIES 2
stm32cube-t
Senior III
Posted on January 07, 2015 at 11:15

Hello Jimmy,

When you create a new project, click the Board tab and select theSTM32F429 discovery board there: this loads the pin configuration for the board in pinout tab. Enable USB peripheral (USB OTG HS) and middleware (Device / CDC Class).

From the configuration tab, click USB_HS to open theinitialization configuration settings and disable the Low Power feature.

Please find .ioc file attached for this configuration.

Make sure to have the virtual port comm driver on your PC:

In the toolchain, increase the stack and heap size to 4000 (in startup file for MDK-ARM toolchain).

Best Regards

________________

Attachments :

F429Disco_USBCDC.ioc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzDc&d=%2Fa%2F0X0000000bLR%2FSAEUN3SdkRVN90Yjzkvq9XebMRisiE3s2Y46RAHfGHk&asPdf=false
renasis
Associate II
Posted on January 08, 2015 at 04:07

STM32Cube-T,

Thanks for the reply. Your cube code worked for me. About a day ago I was able to get this work following the procedure outlined below. Note that I did not disable the  Low Power feature''. It seemed to work without this being disabled. Can you tell me the reason why this should be set?

Procedure(Using Win 7, STM32CubeMX Version 4.5 STM32Cube V1.0, Keil IDE 5.13.0.0 and STM32F429IDiscovery board):

1. Open STM32CubeMX, Select Board Selector tab, Type of Board = Discovery, Reference = 32F429IDiscovery.

2. Pinout->Clear Pinouts.

3. USB_OTG_HS, Internal PHY = Device Only

4. Perhipherals - RCC, High Speed Clock (HSE) = Crystal/Ceramic Resonator

5. MiddleWares - USB_Device, Class for HS IP = Communication Device Class (Virtual Comm Port).

5. Project Settings -> Set Project Name = ''CubeProject''(arbitrary), Project Location, Toolchain (in my case MDK-ARM4.73).

6. File->Save Project.

7. Project->Generate Code.

8. Open Project. Opens Keil IDE 5.13.0.0 in my case.

9. Keil IDE asks me if I want to migrate the project from MDK version 4 to MDK version 5, which I elected to do.

10. Left click to select the ''CubeProject Configuration'' tab in the left most tree, Right click to bring up context menu, select Options for Target ''CubeProject Configuration''.

11. On ''Target'' tab change Xtal Mhz from 12.0 to 8.0.

12. On ''Debug'' tab click settings(in top right corner), change Port from JTAG to SW. Click the ''Flash Download'' tab. Add STM32F4xx 2MB Flash. Press OK.

13. Press OK again to exit options.

14. Open Application/MDK-ARM folder, edit startup_stm32F429xx.s, change Heap_Size EQU from 0x00000200 to 0x00000400. Save the file.

15. Project->Build target, to compile project.

16. Connect pc to usb mini on discovery board(for code download). Connect pc to usb micro on discovery(for VCP).

17. Flash->Download, to download to board.

18. Reset the board. Click black push button knob or unplug and reconnect usb mini cable from board.

19. Check Device Manager in Windows, you should see under Ports(Com & LPT) an entry for STMicro Electronics Virtual Com Port (COM##).