dear sir,
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
dear sir,
MOHAMMAD NASEER M N said:not getting proper output just go through my code and assist me...
Minus any, "please" - this comes across as a command - does it not? Can that be good - prove motivating - to your (potential) helpers?
Have you not a near identical post - presently just "one forum space removed" from this one? Overloading this forum space may not prove effective & usually is frowned upon.
My friend - it will (really) assist you to really read/review the, "Peripheral Library User Guide."
There - under the GPIO section - you'll find: "GPIOPadConfigSet()" and that function includes the ability to enable, "GPIO_PIN_TYPE_STD_WPU" (or its counterpart) "WPD" - one of which is usually required so that your MCU may "see" a switch closure. Switch may close to ground or to Vcc - when closing to ground you must use "WPU" - when closing to Vcc - "WPD."
Have you access to a voltmeter? You must insure that your switch (really) causes a notable change in the voltage level at the MCU pin. Be very slow/cautious in probing - best done (away) from the MCU pin - at board's header if possible - to measure and confirm that the switch really does cause a major change in voltage level - at the target MCU pin.