cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo-F767ZI Serial data through USB to Go connector?

John Griswold
Senior
Posted on October 27, 2017 at 19:43

I am trying to configure a system to send data out CN13 on the Nucleo-F767ZI board. The CubeMX outputs seem to indicate this port is already set up:

100 PA8* USB_OTG_FS_SOF USB_SOF [TP1]

101 PA9* USB_OTG_FS_VBUS USB_VBUS

102 PA10* USB_OTG_FS_ID USB_ID

103 PA11* USB_OTG_FS_DM USB_DM

104 PA12* USB_OTG_FS_DP USB_DP

but there is no initialization of the port in the code (which I inherited).

I haven't been able to find much in the way of help in the programming manuals, so I thought I'd ask the community.

Thanks

6 REPLIES 6
John Craven
Senior
Posted on October 27, 2017 at 21:00

From the Nuc-144 user manual;

0690X00000608m2QAA.png0690X00000608m7QAA.png0690X00000608mCQAQ.png
Posted on October 28, 2017 at 16:24

Thanks - that's apparently the default configuration. Now, which UART/USART can I connect to this USB? I am using 3, 4, & 5, so 1, 2, 6, 7, and 8 are available. Any suggestions?

S.Ma
Principal
Posted on October 28, 2017 at 20:48

Remember that the STLink is a composite USB device, which has 3 functions:

- Debugging (HID)

- Mass storage (mBed, file drag and flash)

- Serial virtual user port (UART)

This USB virtual com port is usually connected to the target STM32 UART (check the schematic). This way, you can use a PC console with minimal SW development efforts.

Posted on October 28, 2017 at 20:20

I think we're going to punt on this. I don't see a way to get the serial data to the USB connector from the Nucleo-144 board, and there's no spare port on the Nucleo-64 board also in the box, so a direct solution is not obvious. But FTDI makes this great little chip that converts serial-USB, and we've got a couple of the interface boards (2cm x 5cm) ordered for Monday delivery.

Thanks again to the community.
John Craven
Senior
Posted on October 30, 2017 at 15:17

This nucleo has two usb connectors. CN1 on the stlink and CN13 for USB OTG.

Before we start, you should read 6.9 and 6.10 in Nuc-144 user man. UN1974

If you just want to get going fast, the STLINK creates a VCP (on CN1 connector).

The stlink connects to PD8/PD9 on the 767 (see schematic figure 16/17 in UM)

0690X00000608YhQAI.png 0690X00000608hNQAQ.png

These are also the alternate pins for USART3 TX/RX.

If you are using Cube, enable USART 3. This enable PB10/PB

Then gotoeach of

PB10/PB10 pins

and crtl-click them, and CUBE shows the alternates, PD8/PD9.

Reassign them.

Generate your project. Add the following to your main loop;

/* USER CODE BEGIN 2 */
 uint8_t buffer[16] = ''Hello World

'';
 /* USER CODE END 2 */
 /* Infinite loop */
 /* USER CODE BEGIN WHILE */
 while (1)
 {
 /* USER CODE END WHILE */
 /* USER CODE BEGIN 3 */
 HAL_UART_Transmit(&huart3, (uint8_t*)buffer, 13, 1000);
 HAL_Delay(1000);
 }
 /* USER CODE END 3 */�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?

in device manager, you find ports as shown below.

in this case, i have two nuc boards connected, one with normal stlink, and a 2nd with stlink reflashed with JLink firmware.

0690X00000608o8QAA.png

Goto your favorite terminal and connect your VCP comm port.

I think this is what your wanted to do. But....

If you really want to connect to CN13 using OTG.

The CN13 is dead, until you put some USB stuff in your project.

You have to setup USB_HS/FS and USB_CDC in your project.

Finally, going back to the UM, make sure you read the warning;

0690X00000608o9QAA.png
Posted on October 30, 2017 at 17:57

Thanks for your efforts, but we are taking the alternate path. I can't use STLink, as we've removed that board for size constraints, and the warnings about CN13 make me terribly reluctant to pursue that option. We're trying to get an FTDI interface card working.

Thanks again,

John