How do i need to configure STM32H743 (I have NUCLEO-H743ZI) USB to see it as Serial Port?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-14 6:32 AM
What I do now:
- Initialize all peripheral in Default mode (this is the dialogue option)
- USB_OTG_FS MODE: Device Only | Activate VBUS : VBUS sensing | Activate SOF
- USB_DEVICE (as middleware) Class For FS IP: Communication Device Class (Virtual Port Com)
- Default clock configuration (no changes from as it proposed by Cube)
- I generate it as Makefile
And just build it and flash it. The only COM port I saw it's ST-Link (com3)
As sanity check: usb cabel connected to both usb_connectors on board (not only to ST-Link micro usb) after connecting usb to main part of the board LD8 (green) lights up.
The blinking blue led just for debugging purposes, to make sure that board was flashed.
But I don't see another COM port into device manager, only the ST-link one:
Solved! Go to Solution.
- Labels:
-
STM32H7 Series
-
USB
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-17 6:12 AM
Hello @esukh​ ,
Please make sure to increase the heap size.Using Keil for example, the heap size is 0x200 by default which is too low for USB applications.
Khouloud.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-14 6:38 AM
attachment:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-14 7:37 AM
I'd probably port
STM32Cube_FW_H7_V1.3.0\Projects\STM32H743I_EVAL\Applications\USB_Device\CDC_Standalone
Use the ST-LINK VCP to output diagnostic and telemetry information to understand if the device code is functioning or interacting with the system. Perhaps confirm if you can have it appear as a DFU device if you strap BOOT(0) High and connect.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-15 6:40 AM
I did, and my device manager discover some unknown usb device, but there is no description to it.
And this is really amaze to me, why does native example doesn't work correctly (I checked that all pins on EVAL board the same as on nucleo)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-17 6:12 AM
Hello @esukh​ ,
Please make sure to increase the heap size.Using Keil for example, the heap size is 0x200 by default which is too low for USB applications.
Khouloud.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-17 7:09 AM
Some other points to check:
- Please make sure to call " HAL_PWREx_EnableUSBVoltageDetector(); " after "MX_USB_DEVICE_Init" function.
- JP4 must be closed when using USB OTG FS.
Khouloud.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-22 5:37 AM
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-23 2:43 AM
You're always welcome!
Khouloud.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-17 10:07 AM
Dear @esukh​
did your code start to work (you start to see two COM ports: from stlink and usb CN13 ) ?
I have the same probrem - i take my Nucleo STM32H743 board, open example for STM32H743 EVAL (generated by CUBE) USB_DEVICE/CDC_STANDLONE from STM site and program my board.
It doesn't work (
In code: "Heap_Size EQU 0x1500" "Stack_Size EQU 0x1500"
Chip is the same and i hoped, that code for EVAL board will work on NUCLEO board.
Could you explain what i need to change for: starting to see TWO com ports and code will start to work ?
My MAIN function:
unsigned char text[20]="Hello 2021";
/* Enable the CPU Cache */
CPU_CACHE_Enable();
HAL_Init();
/* Configure the system clock */
SystemClock_Config();
/* Init Device Library */
USBD_Init(&USBD_Device, &VCP_Desc, 0);
HAL_PWREx_EnableUSBVoltageDetector();
/* Add Supported Class */
USBD_RegisterClass(&USBD_Device, USBD_CDC_CLASS);
/* Add CDC Interface Class */
USBD_CDC_RegisterInterface(&USBD_Device, &USBD_CDC_fops);
/* Start Device Process */
USBD_Start(&USBD_Device);
USBD_CDC_RegisterInterface(&USBD_Device,&USBD_CDC_fops);
// my code
USBD_LL_Init(&USBD_Device); // Idecided that wiil help to send data via com port to PC
USBD_LL_DevConnected(&USBD_Device); // Idecided that wiil help to send data via com port to PC
while (1)
{
USBD_LL_Transmit(&USBD_Device,0,text, 20); // Idecided that wiil help to send data via com port to PC
// USBD_CDC_SetTxBuffer(&USBD_Device, text,20);
// USBD_CDC_TransmitPacket(&USBD_Device);
}
Best regards.
