Hi all,
Just want to confirm what I read in ref. manual.
Is that true that only PTA2 and PTA3 (on MKE06Z128VLH4) can be used for open collector circuit?
If so, is the following seq. enough for configuration of the input/output for open collector circuit:
GPIOA_PDDR |= ( GPIO_PDD_PIN_2 );
GPIOA_PIDR &= ~( GPIO_PDD_PIN_2 );
PORT_PUE0 |= ( GPIO_PDD_PIN_2 );
/* Set initialization value to high*/
GPIOA_PDOR |= ( GPIO_PDD_PIN_2 );
Is there any possibility go get interrupt when pin 2 is falling? Should I use KBI for that purpose, would it work?
Thanks.
Hi Yuriy Dovalyuk,
PTA2 and PTA3 are true open-drain pin when operated as output, and the internal pullup has no effect.
But if you use these pins as the IIC, the internal pullup device remains active when PTAPE2, PTAPE3 is set, it is automatically disabled to save power when output low.
So, except I2C module pin, PTA2 and PTA3 need add external pull up when it is configured as output.
For KBI, because it is the input module, so you can use the internal pullup and can get the interrupt.
Wish it helps you!
If you still have question, please contact me!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------