cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX assumes GPIO is input while using LL library?

Mario Luzeiro
Senior

I'm not sure if this is a bug, but STM32CubeMX assumes GPIO is input while using LL library? And is not configuring it to be Input ?

I found that I had to force to configure the pin as Input so it will work with external interrupts.

1 ACCEPTED SOLUTION

Accepted Solutions
Aziz BRIGUI
ST Employee

Hello @Mario Luzeiro​  ,

  

You are right, pins should also be configured as inputs when setting up an external interrupt. This is not intended behavior and have been reported.

Internal ticket number: 126386 (This is an internal tracking number and is not accessible or usable by customers).

Thank you for your contribution and sorry for the inconvenience, I will keep you posted with updates on the issue.

If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly.

Best regards,

Aziz

View solution in original post

5 REPLIES 5
Nikita91
Lead II

I think on most MCUs the default GPIO mode is analog input to lower the power.

LL does not configure GPIO if you do not do it yourself

Aziz BRIGUI
ST Employee

Hello @Mario Luzeiro​ ,

Thank you for your feedback,

Can you provide more explanation to help us reproduce the behavior you observed. For example you can share an IOC file demonstrating the issue, or steps we can follow to get the same results.

Best regards,

Aziz

ioc attached.

It setups an external interrupt line on rise input, but it does not setup the pin as input.

If I use the same configuration but with HAL library instead of LL, it works (because HAL code initiates it as input, on same function as setting it as external interrupt)

I'm not sure if how the CM4 inits its program, from a "production mode" debug, but it may be that in that case it does not proceed with a proper MCU reset, so the settings may not be as from reset?

Aziz BRIGUI
ST Employee

Hello @Mario Luzeiro​  ,

  

You are right, pins should also be configured as inputs when setting up an external interrupt. This is not intended behavior and have been reported.

Internal ticket number: 126386 (This is an internal tracking number and is not accessible or usable by customers).

Thank you for your contribution and sorry for the inconvenience, I will keep you posted with updates on the issue.

If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly.

Best regards,

Aziz

Aziz BRIGUI
ST Employee

Hello @Mario Luzeiro​,

Issue fixed in STM32CubeMX latest release.

V6.6.0 is now available under this Link.

Thank you for your contribution.

Best regards,

Aziz.