I’m creating a product based on the BW16 module, to replace an existing module from another supplier.
I’m having troubles with the PA_15 input.
The application calls for an external GPIO interrupt in the BW16. I have configured PA_15 to an input, no pullup, and trigger on both edges. In normal cases, it all works well.
However, due to a BOM error on the product this module will be used with, some products have a 10k ohm resistor in series with PA_15.
host micro -------- 10k resistor -------- PA_15
With this 10k in series, PA_15 can detect a low level, but it cannot detect a high level.
The other side of the 10k resistor is driven to 3.3v by a microcontroller, but the voltage on PA_15 reads around 0.25v, not enough for logic high.
Yes the 10k in series is wrong, but its not able to be changed now. The other microcontroller (the one I’m replacing) was able to handle this OK, provided pull-up and pull-down were disabled.
I have tried a number of things with the PAD control register. Various drive strengths, pull up/pull down/no pull, etc.
I can see that when when I have the small pullup resistor selected, but with the pullup disabled, voltage is around 0.25v at PA_15. With large resistor selected, but pullup disabled, the voltage on PA_15 changes to 0.59v.
This seems wrong, as the pullups should not be enabled at all.
I can see in the data sheet that there is “Resd” resistor in series with the input, but I can’t find its value.
What is the input impedance of PA_15?
Is there any register settings I can change to get PA_15 to read high when driven via a 10k resistor to 3.3v?
Here is my init code:
GPIO_InitStruct.GPIO_Pin = HOST_REQUEST;
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStruct.GPIO_ITTrigger = GPIO_INT_Trigger_BOTHEDGE;
GPIO_InitStruct.GPIO_ITPolarity = GPIO_INT_POLARITY_ACTIVE_LOW;
// enable interrupt
GPIO_INTMode(HOST_REQUEST, ENABLE, GPIO_INT_Trigger_BOTHEDGE,
GPIO_INT_POLARITY_ACTIVE_LOW | GPIO_INT_POLARITY_ACTIVE_HIGH,
InterruptRegister(GPIO_INTHandler, GPIOA_IRQ, (u32)GPIOA_BASE, HOST_IRQ_PRIORITY);
GPIO_UserRegIrq(HOST_REQUEST, (void *)host_irq_handler, &GPIO_InitStruct);