STM32F 5V to open drain pin

Discussion in 'Embedded Systems and Microcontrollers' started by Vindhyachal Takniki, Apr 23, 2015.

  1. Vindhyachal Takniki

    Thread Starter Member

    Nov 3, 2014
    349
    6
    1. I am using stm32f205.
    2. MCU is powered by 3.3V.
    3. Another ic pin is driven by 5V logic or (Vih = 0.7*VDD = 3.5V)
    4. Can I set pin of STM32F2 as open drain & connect 5V by pull up to it.
    5. Datasheet of MCU says that they are not true open drain pins.
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,363
    The IC that is powered from 5V may be able to accept a 3.3V logic input.
     
  3. Papabravo

    Expert

    Feb 24, 2006
    10,152
    1,793
    The words of your post do not quite convey enough information. I can tell you this.
    An open drain pin is supposed to be an output. It is actually designed to be connected to other open drain outputs. This means that any one of them can pull low, but all of them have to agrree for it to be a 1.
    I think what you are looking for is a 5V tolerant input. If the processor doesn't provide it then you need to.
     
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    What does the datasheet say about the maximum voltage an input pin can handle? Does the MCU have input protection diodes to clamp any voltage above its supply voltage (3.3V)?
     
  5. Vindhyachal Takniki

    Thread Starter Member

    Nov 3, 2014
    349
    6
    @Papabravo , I have to drive CS/enable pin of other IC which is 5V & its Vih = 0.7*5 = 3.5V.
    MCU at 3.3V.
     
  6. Papabravo

    Expert

    Feb 24, 2006
    10,152
    1,793
  7. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    @Vindhyachal: what you describe (pull up to 5V) is an acceptable way to make a low to medium speed transition. The speed is limited as you only have a fixed resistor to supply current. A chip select can usually be run slow enough to make it work, you do want to check this on the breadboard with a scope.

    So as long as the open drain output on the STM device can handle 5V (tolerant) this should work for you.
     
Loading...