AnsweredAssumed Answered

creat project virtual com port

Question asked by med_yassine.jebabli on Sep 16, 2015
Latest reply on Sep 17, 2015 by 68516
Hello, please give me the procedure to creat a project virtual com port(usb cdc)  with STM32CubeMX. (STM32F429discovery)
I followed the steps but according to manager level péréphirique the material is unknown:

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 leftmost tree, Right click to bring up context menu, select Options forTarget "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 fromJTAG to SW. Click the "Flash Download" tab. Add STM32F4xx 2MB Flash.Press OK.
13. Press OK again to exit options.
14. OpenApplication/MDK-ARM folder, edit startup_stm32F429xx.s, change Heap_SizeEQU 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##).



Outcomes