2024-09-30 02:27 AM
Is the pull down resistors on PA7 and PC1 necessary or can I skip these? (These pins are SPI2 MOSI)
The reason why I ask is because I need to use the ADC functionality of these pins, but with the pull down resistors it's messing up my ADC readings, so it would be good to be able to exclude these pull down resistors.
From the STM32 bootloader documentation:
It is recommended to keep the RX pins of unused bootloader interfaces (USART_RX, SPI_MOSI and CAN_RX) at a known (low or high) level at the startup of the bootloader (detection phase). Leaving these pins floating during the detection phase might lead to activating unused interfaces.
Solved! Go to Solution.
2024-09-30 04:21 AM - edited 2024-09-30 04:34 AM
@Oscar3 wrote:
That is the question - I don't know if I can use these pins for both bootloader and ADC.
The answer is simply: no, for the reason I stated in my first comment and you've already faced an issue.
2024-09-30 02:32 AM
What hardware are you talking about?
Do you need to use the built-in bootloader?
JW
2024-09-30 02:37 AM
@Oscar3 wrote:Is the pull down resistors on PA7 and PC1 necessary or can I skip these? .
Your datasheet quote just says not to leave these pins open - it doesn't say you have to specifically have pull-downs.
@Oscar3 wrote:I need to use the ADC functionality of these pins,
But does that leave these pins open ?
If not, then you've satisfied what the datasheet said!
(so long as your input signal can't be confused with a valid bootloader trigger...)
2024-09-30 02:38 AM
Hello @Oscar3 and welcome to the community,
You need to remove these pull-up/down resistors as it may affect the impedance of the ADC input and therefore the conversion. Please review this application note AN2834 How to optimize the ADC accuracy in the STM32 MCUs.
As long as you didn't activate the bootloader, you don't risk to activate unused interfaces.
2024-09-30 02:48 AM
Hi everyone, thank you for your quick replies!
I forgot to mention, I do set it in bootloader mode (by another MCU, STM32H573IIT6) - but I only use SPI1 and do not use the NSS pin.
That's why I'm wondering of the resistors on SPI2 pins... is there any risk of weird functionality of not placing pull downs on these pins?
2024-09-30 04:04 AM
Hello,
I'm wondering how you will use these pins for the bootloader and then for ADC in your application. Simply choose another GPIO having a free ADC channel.
2024-09-30 04:10 AM
That is the question - I don't know if I can use these pins for both bootloader and ADC.
I have already maxed out all of the free ADC pins (That does not require a PD or PU resistor) but I need two more...
Is it my only option to change MCU or can I somehow skip these PD resistors even though I put the MCU in bootloader mode? I'm also open to other suggestions of course.
2024-09-30 04:21 AM - edited 2024-09-30 04:34 AM
@Oscar3 wrote:
That is the question - I don't know if I can use these pins for both bootloader and ADC.
The answer is simply: no, for the reason I stated in my first comment and you've already faced an issue.
2024-09-30 04:40 AM
I understand, thanks for clearing that up.