cancel
Showing results for 
Search instead for 
Did you mean: 

Confusion about _C Pins (PA0_C) Behavior and Functionality

AAlis.23
Associate III

I don’t understand the behavior of the _C ports. According to the datasheet, the pin type for PA0_C is listed as ANA (analog input only). However, I can configure it as an output and successfully generate a square wave by toggling it in a loop.

Given that, it seems the pin does have an output driver, but I can't get TIM5_CH1 to generate PWM on this pin. (Note: The same configuration works perfectly on TIM5_CH2, so it’s not a configuration issue.)

Additionally, when I configure PA0 as an ADC input, PA0_C no longer works as an output, only when PA0 is in reset state (not configured)

This behavior is confusing because it contradicts the pin type listed as ANA in the datasheet, and it’s not clearly explained how these _C pins should behave. Could someone clarify what can or cannot be done with the _C pins and why this behavior occurs?

The IC is an STM32H743XI (TFBGA 240+25).

Thanks in advance!

6 REPLIES 6
AAlis.23
Associate III

I understand that it is done by configuring the corresponding bit in the SYSCFG->PMCR register. However, I don't see CubeMX modifying any value in that register when generating the code (which is probably why it doesn’t work).

On the other hand, I don’t understand how PA0_C can function as a GPIO output, but when I configure it for PWM, it doesn’t work. I don’t see how that could be related to the configuration—either both modes should work or neither, which leaves me in the same situation as before.

So, it’s either a CubeMX bug (yet another one) or I’m missing something here.

mƎALLEm
ST Employee

Hello @AAlis.23 ,


@AAlis.23 wrote:

The IC is an STM32H743XI (TFBGA 240+25).


According to the article, and with that package, all different pads PXC_C are exposed on the package and all the switches are off after reset leaving a given PXY_C disconnected from PXY pad. 

 


@AAlis.23 wrote:

the pin type for PA0_C is listed as ANA (analog input only). However, I can configure it as an output and successfully generate a square wave by toggling it in a loop.


Telling that you can toggle PA0_C pin without configuring the switch is something strange because after reset PA0_C is connected only to the ADC input (the switch is Off after reset).

You need to check the bit PA0SO value in SYSCFG_PMCR. Is is set to 1?

Knowing that:

0: Analog switch closed (pads are connected through the analog switch)
1: Analog switch open (2 separated pads)

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.

All these explanations are very helpful, I appreciate them, but all that still doesn't explain why I can set a pin as GPIO output (meaning the switch configuration is correct) but it doesn't support PWM when it should.


@AAlis.23 wrote:

I can set a pin as GPIO output (meaning the switch configuration is correct) 


To me this is weird. That's why I asked you to check PA0SO bit in SYSCFG_PMCR.

 


@AAlis.23 wrote:

 but it doesn't support PWM when it should.


This is expected as the PA0_C switch is OFF.

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.