cancel
Showing results for 
Search instead for 
Did you mean: 

stm32 GPIO input from mcp23017 interrupt

lk.dgironi
Associate III

Hello,

I'm working on a project involving an STM32F103 and a mcp23017 port expander.

I've connected the mcp23017 INTA to PA15, no pull-up or down involved.

I'm able to drive the mcp23017 via I2C, no problem about that.

The problem I have is detecting the mcp23017 output status.

Two kinds of configuration works to me:

A) The mcp23017 is configured as active high output, while the PA15 as EXTI Rising edge trigger detection with no pull-up/down. This configuration works ONLY after i force a shortcut between INTA/PA15 and GND.

B) The mcp23017 is configured as active low output, while the PA15 as EXTI Falling edge trigger detection with no pull-up/down. This configuration works ONLY after i force a shortcut between INTA/PA15 and VCC.

The problem is that at every power-up, the shortcut is needed.
Seems something related to a "polarization" of the output.

I've try other configurations (opendrain on mcp23017 and pull-up/down on STM32) with any success.

I'm thinking about adding an NPN between INTA and the STM32 input. Does anyone have an idea of why I've to shortcut at any power-up, and/or how to solve this?

Thank you!

 

0 REPLIES 0