cancel
Showing results for 
Search instead for 
Did you mean: 

GPIOs doing nothing on Nucleo 144 F746

CKurt.2
Associate II

I just got a Nucleo 144 F746. I tried setting up the default configuration in the latest CubeMX for this Nucleo board, and writing a super simple blinky program (put the following in the main while(1) loop:

 HAL_GPIO_TogglePin(LD2_GPIO_Port, LD2_Pin);

 HAL_Delay(500);

)

LED does not do anything, even when I just try to make it always on and then enter an empty while loop.

I tried making a dumb simple blinky in Arduino IDE, i.e.,

```

void setup() {

 // put your setup code here, to run once:

 pinMode(LED_BUILTIN, OUTPUT);

}

void loop() {

 // put your main code here, to run repeatedly:

 digitalWrite(LED_BUILTIN, HIGH);

 delay(1000);

 digitalWrite(LED_BUILTIN, LOW);

 delay(1000);

}```

, and this works perfectly fine. Anyone able to give me some pointers to using CubeMX and CubeIDE?

4 REPLIES 4

Need to enable the GPIO clock, and initialize the pin for output

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Could you elaborate? I thought CubeMX handled that automatically? I have it set as GPIO output in CubeMX, and repeated the GPIO init in my code for redundancy and it still wasn't working.

Read out and check/post content of the related RCC registers (which enable the clocks) and GPIO registers.

> I thought CubeMX handled that automatically?

Yeah, maybe, and maybe you just missed some vital click. It's very easy to control the ports through registers, but it's hard to find an error in a chain of clicks.

JW

Alright, checking out the debugger again fixed it for me. When I first got started I was trying to flash by Simulink, and I tried the debugger with that setup and everything seemed fine. I moved away from simulink flashing stuff to basic C, but never tried the debugger again. Turns out the code was getting hung up on MX_ETH_Init. Commented that out and it all works now, thanks!