cancel
Showing results for 
Search instead for 
Did you mean: 

Why Pullup on LEDs ?

nicolas
Associate III

When using STM32CubeIDE 1.12.0 with a NUCLEO-U575ZI-Q, the code generated use pullup for the LEDs. It become impossible to achieve low power with those pullup.

6 REPLIES 6
Peter BENSCH
ST Employee

Can you let us know what the programme is that you have generated so that we can assess why there is a pull-up there?

Perhaps the IOC file alone would help to find the problem.

Regards

/Peter

In order 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.
nicolas
Associate III

By just making an empty project for my nucleo.

Peter BENSCH
ST Employee

OK, just open the IOC in STM32CubeIDE, go to the block GPIO on the left and find your GPIO that is used for LEDs: PB7, PC7 and PG2. They all show a pull-up, right?

Just select all of them by clicking on the first one, hold down the Ctrl key and click on the other two, then in the table below (PB7#PC7#PG2 Configuration) click on the row with GPIO Pull-up/Pull-down and select No pull-up and no pull-down.

That's it.

Does it work for you?

Regards

/Peter

In order 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.
nicolas
Associate III

Thanks for the answer, i know that i can change manually but i think it would be much better that CubeIDE don't put pullup on LEDs when creating a new project for NUCLEO-U575ZI-Q.

If you create a project for the NUCLEO-U575ZI-Q and answer the question "Initialize all peripherals with their default Mode" with No, the LED pins will not have a pull resistor, with Yes a pull-up will actually be applied there.

We should now think about whether this is a problem or just an academic question and change the behaviour if necessary. On the other hand, the user has full freedom to adjust the respective parameters to his needs, right?

Regards

/Peter

In order 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.
nicolas
Associate III

Thanks for the information, indeed i was using the default mode. But if the peripheral were really initialized in there default mode, the LEDs should be put in analog mode. Instead the default mode generate hybrid code that is half default mode and half functional. If the code generator want to initialize the LEDs, it should generated it without pullup. Currently the default mode generate nonsense and misleading code for the LEDs.

Also what does "default mode" means ? Because just after a hardware reset, the LEDs pin doesn't have pullup.