Skip to main content
GOztu.1
Associate II
November 5, 2024
Solved

STM32H753VIT6 PC2_C Pin

  • November 5, 2024
  • 8 replies
  • 1704 views

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.

This topic has been closed for replies.
Best answer by mƎALLEm

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

 

 

8 replies

GOztu.1
GOztu.1Author
Associate II
November 5, 2024

Edit: SYSCFG_PMCR PC2_C value is 0.

mƎALLEm
ST Technical Moderator
November 5, 2024
To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
GOztu.1
GOztu.1Author
Associate II
November 5, 2024

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.

mƎALLEm
mƎALLEmBest answer
ST Technical Moderator
November 5, 2024

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 "Best answer" on the reply which solved your issue or answered your question.
Visitor II
November 5, 2024

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.

GOztu.1
GOztu.1Author
Associate II
November 5, 2024

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.

GOztu.1
GOztu.1Author
Associate II
November 5, 2024

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

mƎALLEm
ST Technical Moderator
November 5, 2024

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 "Best answer" on the reply which solved your issue or answered your question.