Hello Niranjan ravi ,
Search the PTB18 pin, then configure it to GPIO function :
then the confiure ptb18 as GPIO function code will be generated in pin_mux.c file:
And it seems there is no difference when confgiure the "Direction" in "Routed Pins" on source code.
While you can refer to the gpio demo code , for example :
SDK_2.3.0_FRDM-KV31F\boards\frdmkv31f\driver_examples\gpio
it is simple:
About the use of MCUXpresso configure tool, you can clik menu Help->Contents:
Hope it helps
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
Thank you for your inputs. I have configured the pins but the problem is I am trying to read the input value(EITHER 1 OR 0) through a GPIO port PTC9(WHICH I CONFIGURED) through an inbuilt function called
GPIO_ReadPinInput(GPIO_Type *base, uint32_t pin) .
But this function is not returning a value (EITHER 1 or 0 ) whichever it receives and it is showing <optimized value>.
There is no example to do this functionality using GPIO pin.
I am sending the inputs to GPIO of KV31F(PTC9) from GPIO pin of FRDM K64F(PTB9). Could you please tell me if this communication is actually possible and if so how should I proceed?
We have tried all possibilities for this but<optimized value> is only we are receiving. We are not able to establish a communication protocol in this way.
Hello Valli,
Could you please first test a simple project ,for example only read the a simple pin.
I test on my side with TWR-KV31 board, configre PTC6 pin as input, high, then read it ,
work well:
And please pay attention to that , enable the gpio interrupt , otherwise it won't update:
About " <optimized value>." , where shows this ?
Hope it helps
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------