Skip to main content
med
Associate II
September 16, 2015
Question

creat project virtual com port

  • September 16, 2015
  • 4 replies
  • 1027 views
Posted on September 16, 2015 at 11:01

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##).

    This topic has been closed for replies.

    4 replies

    Nickname5522_O
    Visitor II
    September 16, 2015
    Posted on September 16, 2015 at 14:51

    Hi med_yassine.jebabli,

    1-Upgrade STM32CubeMx to version

    http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF259242?s_searchtype=partnumber

    2-Upgrade STM32CubeF4 to version

    http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/LN1897/PF259243?s_searchtype=partnumber

    According to steps that you followed

    https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/stm32f429%20Discovery%20vcp%20with%20STM32CubeMX%20drivers&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21&currentviews=392

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

    4-You do not need to clear pinouts

    5- USB_OTG_HS, Internal PHY = Device Only

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

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

    8-Configuration view: in connectivity USB_HS: set parameters as you like

    9-Project Settings -> Set Project Name = ''(arbitrary)'', Project Location, Toolchain ..

    10-Change the heap valueto 0x4000 as mentioned in this [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/problem%20in%20virtual%20com%20port&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/AllItems.aspx&currentviews=43]post

    -Shahrzad-

    med
    medAuthor
    Associate II
    September 17, 2015
    Posted on September 17, 2015 at 13:07

    Theb same problem,I updated the version of cubeMX to 4.5.0 and the version of my library to 1.8.0 then I created a project and after opned with keil I changed the value of heap size to 0x4000 then to 0x00000400 and the size of CDC_DATA_HS_MAX_PROJECT_SIZE to 64 but the same problem the manager péréphirique don't know my VCP

    this is the link of my project : http://www.mediafire.com/download/pii6kxrh012lf1t/CDC+usb.rar

    med
    medAuthor
    Associate II
    September 17, 2015
    Posted on September 17, 2015 at 13:33

    Please help me !!

    Nickname5522_O
    Visitor II
    September 17, 2015
    Posted on September 17, 2015 at 19:27

    Hi med_yassine.jebabli,

    1-You wrote that you dowloaded CubeMx 4.5.0? but the latest version is 4.10!

    2-Did you test an example with virtual com port from the latest package? If this example works and your project does not, maybe you have a hardware problem.

    3-Did you install the virtual port com driver on your PC?

    -Shahrzad-