fsl_gpio with KL25Z

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

fsl_gpio with KL25Z

跳至解决方案
1,686 次查看
kyizawwin
Contributor II

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

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
1,501 次查看
DavidS
NXP Employee
NXP Employee

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

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,502 次查看
DavidS
NXP Employee
NXP Employee

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

0 项奖励
回复
1,501 次查看
kyizawwin
Contributor II

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

0 项奖励
回复
1,501 次查看
DavidS
NXP Employee
NXP Employee

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

0 项奖励
回复