cancel
Showing results for 
Search instead for 
Did you mean: 

Cube bug or a misunderstanding on my part?

Posted on March 05, 2015 at 01:01

My EE was using CubeMX for a 407 and noticed that a lot of the pins can be declared as being GPIO_ANALOG, even if the pins have no analog alternate functions and are not able to be routed to ADCs or DACs.

I declared PE0 as GPIO_ANALOG and Cube did generate code to load PE0's mode register with analog, and running the code didn't generate any asserts, but what does that mean?

Is this a CubeMX bug or is there some undocumented semantics that I'm missing? (take that as the english language ''or'' please).

#cubemx-gpio_analog
3 REPLIES 3
raptorhal2
Lead
Posted on March 05, 2015 at 01:10

No bug.

CubeMX defaults to setting unused pins as analog to minimize power consumption. If that is not satisfactory, select ''Project'', then ''Project Settings'', then ''Code Generator'' and select a different option.

Cheers, Hal

Posted on March 05, 2015 at 01:14

Analogue Input really means it turns off all the digital circuitry on the pin, including a schmitt trigger on the input that usually feeds into GPIOx->IDR

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 05, 2015 at 03:04

Got it. That makes perfect sense.

Thanks.