Skip to main content
Visitor II
January 16, 2023
Question

Where can I find a collection of basic hardware demos for the Nucleo-f767zi board?

  • January 16, 2023
  • 4 replies
  • 2722 views

I just need a basic USB HELLO WORLD code example that works.

I have tried a few step by step examples that were for other boards and one I found specifically for the F767zi, but my windows machine does not even see an Error connecting, it acts like nothing is connected.

Here are the basic steps I have tried to follow:

Start a new project:

Select the board "Nucleo-F767zi"

Connectivity - USB_OTG_FS- Mode=Device Only.

Clock Config: Input 8 mhz. yielding USB 48mhz. (allowed auto Resolve to fix all conflicts)

Middleware: USB_Device: class for HS IP (Disable),

Class for FS IP (Communication device class (virtual Port Com)

Build the config code.

the user includes are:

#include "main.h"

#include "string.h"

#include "usb_device.h"

however, there are USBD_CDC.H and USBD_CDC.C in the project files that are not called. I am just guessing they are referenced in one of the other modules. no example I have found mention adding them to the includes.

Without any additional code, the online examples say this should establish a basic connection. One demo included a transmit, but nothing happened.

Mainly because I could not find a COM port to connect to with putty.

In the infinite while(1) { } loop.

 uint8_t buffer[] ="Hello World!\r\n";

 CDC_Transmit_FS(buffer,sizeof(buffer));

 HAL_Delay(1000);

I am using a tested and known good USB cable. I am plugged into "User USB CN13" There is a green light (VBUS LD8) that lights up when I plug in.

As I have said, the PC (windows 10) is ignoring the connection as if nothing is connected at all.

I have completed the "Blink" and "Blink with button press" demos. I even tried out PWM diming of the LEDS to check out the timers. I am sure I am missing something obvious. The Chip and Nucleo boards are completely new to me and my previous MCU experiences may be clouding my perception.

Thanks,

-Mike

    This topic has been closed for replies.

    4 replies

    Technical Moderator
    January 17, 2023

    Hi @Rover​,

    2 ready to use USB device examples dedicated for Nucleo-f767zi are available under Github repository of STM32CubeF7 package, and precisely: STM32CubeF7/Projects/STM32F767ZI-Nucleo/Applications/USB_Device.

    If you would like to build your own example, I suggest you to follow videos shared in this discussion.

    -Amel

    RoverAuthor
    Visitor II
    January 17, 2023

    Thank you for the quick reply. I am interested in the HID interface also so I may try that example out. My main focus is the Com device right now.

    I looked at the GIT and could see all the files, but the project file was not included. I tried to copy all the files to a blank project, but I was having trouble getting all the includes It appears that I need to select Middleware options to add the includes., but when I build the config source code, it seems to mess up some part of the downloaded code. Is there a easier way?

    Technical Moderator
    January 18, 2023

    Hi @Rover​ ,

    You can download the STM32CubeF7 package from this link: https://www.st.com/en/embedded-software/stm32cubef7.html.

    The USB examples will be located at the same path as in Github.

    -Amel

    Super User
    January 17, 2023

    > but my windows machine does not even see an Error connecting, it acts like nothing is connected.

    What you can see on Windows side depends on the device class.

    If a device had errors enumerating, Windows would show something (at least this is the default behavior). That you see nothing at all can mean either that enumeration is successful or not started at all. Can you see it in Device Manager, View -> devices by container ?

    RoverAuthor
    Visitor II
    January 17, 2023

    Thank you Pavel for the response, Under device manager I can see the STlink com port from the programming port. Based on the USB configuration on the middleware setup, the user port should have the ID :"STM32 Virtual ComPort"

    I tried rescanning, unplugging and replunging, and moving to a different USB port.

    I believe you are correct, the USB is not being enumerated, Most likely because the USB code on the Nucleo is not set up correctly.

    I just found this video last night and tried it.

    USB COMMUNICATION DEVICE(VIRTUAL PORT) || STM32F4 ||STM32CUBEIDE. - YouTube

    I followed it step by step except where the chip and board hardware differed. on the Nucleo-F767zi, PA11 and PA12 are connected to CN13. But it did not work.

    I found the circuit diagram for the board. I don't see any jumpers on the DM and DP lines that could disable CN13. I am starting to suspect the VBUS or ID lines. That is assuming I am not overlooking something glaringly obvious. And that is where my real suspicion lies. Most likely a faulty Keyboard manipulator.

    RoverAuthor
    Visitor II
    January 21, 2023

    I don't have the time needed to really hammer away at this. But here is what I have uncovered today.

    I found very good video by a creator named Edison. (link in the attached txt file)

    He builds exactly the type of demo application I would like to get working, but he uses the Nucleo-F446RE board. I am trying to use the NUCLEO-F767zi board. I would not expect that much difference between them, but there must be something.

    I typed out every step he takes. The only changes I made were;

    - the PIN he selected for the LED

    - the Board selection at the start of the project.

    - not hard-wiring a USB cable to the jumpers. I am using PA11 and PA12 which are the defaults in USB_OT_FS. And then plugging my USB Cable into CN13.

    The attached text file includes the steps I typed out from the video as I followed them, and the text for files "USBD_CDC_IF.C" and "MAIN.C"

    If anyone can check my work, I would very much appreciate it.