Hi all,
I am trying PE component fsl_gpio at KSDK_1.2.0. In fsl_gpio component, I could create a few pin under "Output pins" tab. I am following the similar example from here (http://www.element14.com/community/community/designcenter/kinetis_kl2_freedom_board/blog/2015/04/08/... ) but I noticed that I can only use one pin at a time depending on what I defined in "Initialization" lab. Is it normal or intended way?
Thanks,
Bryan
Solved! Go to Solution.
Hi Bryan,
If you can post your project that would be helpful.
The link has the following code shown:
GPIO_DRV_TogglePinOutput(GPIOB18Red);
WAIT1_Waitms(2000);
GPIO_DRV_TogglePinOutput(GPIOB19Green);
WAIT1_Waitms(2000);
GPIO_DRV_TogglePinOutput(GPIOA13Blue);
WAIT1_Waitms(2000);
Are you saying you cannot do this?
One issue I have had in past in the PE gpio component is I increment the output pin configuration rather than the output pin numbers field which then only has one active gpio. Please check that you are incrementing the correct field.
Regards,
David
Hi Bryan,
If you can post your project that would be helpful.
The link has the following code shown:
GPIO_DRV_TogglePinOutput(GPIOB18Red);
WAIT1_Waitms(2000);
GPIO_DRV_TogglePinOutput(GPIOB19Green);
WAIT1_Waitms(2000);
GPIO_DRV_TogglePinOutput(GPIOA13Blue);
WAIT1_Waitms(2000);
Are you saying you cannot do this?
One issue I have had in past in the PE gpio component is I increment the output pin configuration rather than the output pin numbers field which then only has one active gpio. Please check that you are incrementing the correct field.
Regards,
David
Thanks for the reply David.
Yes, you are right. I was incrementing output pin configuration instead of output pin numbers . Where could I find such information? Btw, is there any chance that I could create data bus using GPIOs pins from different port?
Thanks again for the great help.
Bryan
Hi Bryan,
Thank you for letting the Community know the issue/result.
Short answer is maybe for combining gpio to be data bus if you combine sequential PORTn pins. If pins non-sequential then no.
Regards,
David