cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H753VIT6 PC2_C Pin

GOztu.1
Associate II

Hello, i am trying to use SPI2 on STM32H753VIT6 MCU using PD3 as Clock and PC2_C as MISO. Using the Hal libraries, i can generate clock on PD3 pin, and sensor answers me. But i dont get the sensor value on my software. Strange behaviour is, at its normal state i read 0xFF from PC2_C pin, but when i pull PC2_C to ground i can read 0x00. However i cannot read sensor data. When i changed the MISO pin to PB14 it worked. But i need PC2_C for my design. I have seen there have been people that had problems with PC2_C pin due to it being analog pin i assume. But i dont see anything on errata sheet. How can i solve my problem?

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

You need to ensure you don't exceed 1mA as external load:

From the errata:

SofLit_0-1730817097640.png

+ In the datasheet:

SofLit_1-1730817221225.png

 

 

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.

View solution in original post

8 REPLIES 8
GOztu.1
Associate II

Edit: SYSCFG_PMCR PC2_C value is 0.

SofLit
ST Employee

Hello,

Check first the Switch status of PC2_C: https://community.st.com/t5/stm32-mcus-products/stm32h7-pc2-c-and-pc3-c-gpio-not-working/m-p/738739

 

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.

SYSCFG_PMCR registers PC2_C bit is 0. Also when i make SPI2 work at very low speed(20Kbit), i can see somewhat meaningful data but still sometimes it is wrong.

liaifat85
Senior III

Confirm that PC2_C is set to Input mode with a no-pull or pull-up configuration, as floating configurations on certain pins can lead to unstable readings.

What do you mean by Input mode? I am assuming you dont mean the value stated in MODER register because i have already stated that i am using PC2_C as SPI2_MISO pin so Alternative Function. Also, pin is configured as no pull up or pull down.

You need to ensure you don't exceed 1mA as external load:

From the errata:

SofLit_0-1730817097640.png

+ In the datasheet:

SofLit_1-1730817221225.png

 

 

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.
GOztu.1
Associate II

How can i make sure that MISO pin sunks less than 1mA of current?

You need to measure that current and at any time that should exceed 1mA PK-PK.

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.