hi i have question about MKL02Z.
now i try PTA2 is gpio output
but output is not change
is there anythig i miss?
plz, thx for your help
have a nice day.
You can find different examples of configuration like GPIO, in the next link
If you are using KSDK, the next example could help you with the configuration
/* enable clock for PORTs */
configure_gpio_pins( PORTA_IDX );
configure_gpio_pins( PORTB_IDX );
/* This for loop should be replaced. By default this loop allows a single stepping. */
GPIO_DRV_TogglePinOutput( GPIO_MAKE_PIN(GPIOA_IDX, 2));
Hope it helps
thanks very much for your reply, but...
i think it is not helpful for me.
cause, i don`t use KSDK,
and i did setup gpio output on PTA2 so sure.
i`m still working on it
PTA2 is only gpio output cannot change output in my case.
any other output works so fine.
PTA2 input works fine.
only output is problem
anyway, thanks for your kindness
have a nice day
You need to show your code so that it is possible to see what is missing in it.
However this is how to configure the PTA0 output - maybe you see what is missing in your code from it:
SIM_SCGC5 |= SIM_SCGC5_PORTA; // apply clock to port
PORTA_GPCLR = (((0x04) << 16) | (PORT_MUX_GPIO)); // configure as GPIO
GPIOA_PDDR |= 0x04; // set to output
Retrieving data ...