External interrupt default internal pull up

Discussion to talk about software related topics only.
Post Reply
tk1390
Posts: 23
Joined: Thu Apr 13, 2017 10:15 am

External interrupt default internal pull up

Post by tk1390 »

Hi,

I'm implementing a falling edge triggered irq on J2[45] of the MOD5234 board using the included pin_irq.cpp file included in the nburn directory. Specifically, I've implemented BOOL SetPinIrq( int pin, int polarity, void ( *func )( void ) ) pointing to a function that simply keeps a count of the number of falling edges that have occurred.

Something I noticed was that the pin seems to float high once the pin is configured as an interrupt input. Is this nominal behavior? I'm concerned about bus contention as this will eventually be used to sense a power cycle event driven by an external device.

Thanks
User avatar
TomNB
Posts: 569
Joined: Tue May 10, 2016 8:22 am

Re: External interrupt default internal pull up

Post by TomNB »

The interrupt inputs have a 4.7k pull-up. I would not expect it to appear as floating, it should be a very clear pull-up to 3.3V. If it looks like its floating I would first try looking at it with a scope with nothing else connected to verify.
tk1390
Posts: 23
Joined: Thu Apr 13, 2017 10:15 am

Re: External interrupt default internal pull up

Post by tk1390 »

Confirmed. The pin does appear to be pulled hard to Vcc. Is there anyway to disable this pull up? Thanks!
User avatar
TomNB
Posts: 569
Joined: Tue May 10, 2016 8:22 am

Re: External interrupt default internal pull up

Post by TomNB »

You would need to remove the 4.7k resistor from the board. You will need a pullup somewhere in your design for an active low input, otherwise you may get spurious interrupts during initialization. Why not just use the existing 4.7k?
tk1390
Posts: 23
Joined: Thu Apr 13, 2017 10:15 am

Re: External interrupt default internal pull up

Post by tk1390 »

Ah ok I misunderstood, I though it was an internal pull up. My only reason for asking this is because in the final design, the interrupt will be always be connected to signal from a device with a push-pull output stage and I wanted to avoid any bus contention but we can work around that and it shouldn't be an issue.

Thanks again for the quick response!
Post Reply