Skip to main content
Visitor II
March 30, 2024
Question

STM32F411RE6: Analog input on PB5 and PB6 is always 0

  • March 30, 2024
  • 1 reply
  • 864 views

Hi, I'm working with a STM32F411RE6 on a pcb and i've noticed that trying to read an input from PB5 and PB6  just returns 0. I've tried fiddling with the registers eg. setting them to analog input mode, pullup, pulldown and left floating but none of it seems to make a difference. my guess is that is has to do with the ADC. for reference below is a screenshot of my teleplot grah showing various pin analog input

Screenshot from 2024-03-30 09-31-46.png

I've also included a copy of my code and kicad schematic/board

    This topic has been closed for replies.

    1 reply

    Super User
    March 30, 2024

    PB5 and PB6 on STM32F411 are not connected to ADC. See "pin definitions" table in STM32F411 datasheet.

    JW

     

    Technical Moderator
    March 30, 2024

    IMG_7253.jpeg

    Thanks @waclawek.jan  for the contribution, Indeed 

    IMG_7254.jpeg

    changed the label used from L4 to F4 series .

    Let us know @Vandi @if you will be able to get it working now ?

    Ciao

    ST1