GPIO_DRV_SetPinOutput not working?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

GPIO_DRV_SetPinOutput not working?

ソリューションへジャンプ
1,134件の閲覧回数
christopherira
Contributor III

I'm using processor expert and the sdk fsl_gpio for my frdm-kl43z. The commands gpio_drv_setpinoutput, gpio_drv_writepinoutput and gpio_drv_clearpinoutput, all are not working.

I've gotten gpio_drv_togglepinoutput to work, but these other functions have not worked. I've done 10 or so projects and just have had to suffer without the use of these commands.

 

Any ideas?

 

Thanks,

 

Chris

ラベル(1)
タグ(3)
0 件の賞賛
1 解決策
736件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Chris,

I just tested the following code using KDS_3.0+KSDK_1.3+PE for frdm-kl43z successfully.

  /* Write your code here */

  /* For example: for(;;) { } */

  uint32_t pinstate;

  while(1) {

  pinstate = GPIO_DRV_ReadPinInput(LED2_RED);

  pinstate = !pinstate;

     GPIO_DRV_WritePinOutput(LED2_RED, pinstate);

  pinstate = GPIO_DRV_ReadPinInput(LED2_RED);

     GPIO_DRV_SetPinOutput(LED2_RED);

  pinstate = GPIO_DRV_ReadPinInput(LED2_RED);

     GPIO_DRV_ClearPinOutput(LED2_RED);

  pinstate = GPIO_DRV_ReadPinInput(LED2_RED);

     GPIO_DRV_TogglePinOutput(LED2_RED);

  }

Is your KDS Help->Install new software....  up-to-date?

Attached is my working project.

Regards,

David

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
737件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Chris,

I just tested the following code using KDS_3.0+KSDK_1.3+PE for frdm-kl43z successfully.

  /* Write your code here */

  /* For example: for(;;) { } */

  uint32_t pinstate;

  while(1) {

  pinstate = GPIO_DRV_ReadPinInput(LED2_RED);

  pinstate = !pinstate;

     GPIO_DRV_WritePinOutput(LED2_RED, pinstate);

  pinstate = GPIO_DRV_ReadPinInput(LED2_RED);

     GPIO_DRV_SetPinOutput(LED2_RED);

  pinstate = GPIO_DRV_ReadPinInput(LED2_RED);

     GPIO_DRV_ClearPinOutput(LED2_RED);

  pinstate = GPIO_DRV_ReadPinInput(LED2_RED);

     GPIO_DRV_TogglePinOutput(LED2_RED);

  }

Is your KDS Help->Install new software....  up-to-date?

Attached is my working project.

Regards,

David

0 件の賞賛
736件の閲覧回数
christopherira
Contributor III

Hi,

Everything is up to date, but the functions other than toggle do not work.

0 件の賞賛
736件の閲覧回数
christopherira
Contributor III

Actually it's working now

0 件の賞賛