cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo F767ZI - Led LD4 RED

Danilo_
Visitor

Hi, 

I'm new to stm32 boards and I'm using it on platformIO with Arduino framework. 
I have problems with the led LD4 (st-link led).

- When I use the USB cable (JP3 jumper on U5V -> powering the board using usb) the power led LD6 is green but the LD4 is red. When I upload the code the LD4 blinks red and then stable red again once flash is completed and nothing happens (in the code I turn on/off led LD1 and print something).

- When I use external power (7.6V battery on VIN, JP3 jumper on VIN) the power led LD6 is green, the LD4 is green as well. Once I upload the code the LD4 blinks red and then stable red again once flash is completed and nothing happens.

- Also, I tried doing the same thing with framework STM32cube but no luck (same behaviour).

Could you help me, what am I doing wrong?

- This is my .ini file:

[env:nucleo_f767zi]
platform = ststm32
board = nucleo_f767zi
framework = arduino
upload_protocol = stlink
debug_tool = stlink
monitor_speed = 115200
build_flags =
-D USE_FULL_ASSERT
-D DEBUG
-D SERIAL_DEBUG
 
- This is the basic code used:

 

 

#include <Arduino.h>

#define LED_PIN PB0  // Default user LED (LD1)

void setup() {
    Serial.begin(115200);
    pinMode(LED_PIN, OUTPUT);
    Serial.println("Setup Complete");
}

void loop() {
    digitalWrite(LED_PIN, HIGH);  // Turn LED on
    delay(500);
    digitalWrite(LED_PIN, LOW);   // Turn LED off
    delay(500);
}

 


- This is the output after flashing:

Archiving .pio/build/nucleo_f767zi/libFrameworkArduino.a
Indexing .pio/build/nucleo_f767zi/libFrameworkArduino.a
Linking .pio/build/nucleo_f767zi/firmware.elf
Checking size .pio/build/nucleo_f767zi/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 0.3% (used 1332 bytes from 524288 bytes)
Flash: [ ] 1.1% (used 23012 bytes from 2097152 bytes)
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, jlink, mbed, stlink
CURRENT: upload_protocol = stlink
Uploading .pio/build/nucleo_f767zi/firmware.elf
xPack Open On-Chip Debugger 0.12.0-01004-g9ea7f3d64-dirty (2023-01-30-17:03)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1

srst_only separate srst_nogate srst_open_drain connect_deassert_srst

[stm32f7x.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08004534 msp: 0x20080000
** Programming Started **
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
shutdown command invoked

 

3 REPLIES 3

@Danilo_ wrote:

 with Arduino framework. 


For Arduino questions, you should go here:

https://www.stm32duino.com/

Or the Arduino forums

Danilo_
Visitor

Hi Andrew, 

The problem arises even when I use stm32cube as framework. 
I don't think it's a frawework related issue. 
I'll post my question on the link recommend by you. 
Thanks!

Hello @Danilo_ and welcome to the community;

Since you are using an external power supply, I suggest you to refer to the UM1974 / Section 6.4 Power supply and power selection.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.