This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52832 GPIO incontrollable!

Hi,everybody!

        I use nRF52832,supply volt 3.0V normal,program can be downloaded , run and debug,i ensure the program is accurately.To control a gpio P0.09,on the hardware, P0.09 series a resistor to the led and the led is grounded,in the program I set P0.09 to high level.The led doesn't light up after the program is downloaded,but the bluetooth program normal works.Why? TKS.

Parents
  • Standard output, 0.5mA, taking a look at the spec for that LED it wants more like 20mA, at 0.5mA you're barely turning it on. Even if you could source 20mA from the pin you have a 1K resistor (where did you get THATvalue from). Assuming a Vf on the LED of 2.0v and a supply of 3.0V, your drop over the resistor is 1.0v so your current would be limited to about 1mA even if the pin could supply more. 1mA is so low on the graph of luminous intensity vs current  as to be basically .. off. 

    You can't drive a 20mA nominal current LED from a GPIO, even in High mode  (~5mA) and certainly not  in standard mode (0.5mA) and even if it  could supply 20mA, your current limiting resistor is way too large. I calculate 50 ohms to be closer to the mark. 

  • Thank you for your reply.

    I tested it today,even short-circuited the resistance,there's still no reaction.I measured the gpio high level output voltage only about 0.18v,low level output voltage about 0.00...V. I guess the gpio has no output at all.Don't know why?Is it possible that the chip is broken?

  • Did you bother to read my reply AT ALL? The FIRST thing I pointed out to you that the standard drive for a GPIO is 0.5mA. That's nowhere near enough current to light your LED. So yes the voltage is going to be very small because the pin is limiting the current to 0.5mA which probably means yes about 0.2v is all you get across the LED. 

    I'll repeat the last sentence

    You can't drive a 20mA nominal current LED from a GPIO. You certainly can't do it in Standard drive mode, you might, just about, get it to glow in High drive mode which will give you 5mA. 

    If you want to drive a 20mA LED you need to drive it through a transistor switch circuit. 

Reply
  • Did you bother to read my reply AT ALL? The FIRST thing I pointed out to you that the standard drive for a GPIO is 0.5mA. That's nowhere near enough current to light your LED. So yes the voltage is going to be very small because the pin is limiting the current to 0.5mA which probably means yes about 0.2v is all you get across the LED. 

    I'll repeat the last sentence

    You can't drive a 20mA nominal current LED from a GPIO. You certainly can't do it in Standard drive mode, you might, just about, get it to glow in High drive mode which will give you 5mA. 

    If you want to drive a 20mA LED you need to drive it through a transistor switch circuit. 

Children
Related