I use KL03 & need use ( SWD_CLK, SWD_DIO ,RESET_b) as an I/O ( PTA0,PTA1,PTA2)

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

I use KL03 & need use ( SWD_CLK, SWD_DIO ,RESET_b) as an I/O ( PTA0,PTA1,PTA2)

661件の閲覧回数
tigerlo
Contributor III

I use KL03 & need use ( SWD_CLK, SWD_DIO ,RESET_b) as an I/O ( PTA0,PTA1,PTA2) , but as I use these function , 

PTA0 is ok, but PTA1 & PTA2 are fail, Ilist the I/O initial & config , please help me check are there something wrong ?

1. Config I/O
kGpioSpealerPWMCtrl  = GPIO_MAKE_PIN(GPIOA_IDX, 0),  /*  used as speaker PWM control */     -------------  Control PWN OK
kGpioTempIndicatorLED = GPIO_MAKE_PIN(GPIOA_IDX, 1),  /* used as  Temp LED control */          ------------  Control LED  FAIL, no response
kGpioDoorLockCtrl  = GPIO_MAKE_PIN(GPIOA_IDX, 2),  /* used as door open control */   -------------- Control  I/O FAIL , cause system system reset
2. Config I/O
PORT_HAL_SetMuxMode(PORTA,1u,kPortMuxAsGpio); // Temp Indicator  
PORT_HAL_SetMuxMode(PORTA,2u,kPortMuxAsGpio); // Lock control
3. I/O control
GPIO_DRV_SetPinOutput(kGpioTempIndicatorLED); //turn on   kGpioTempIndicatorLED
GPIO_DRV_ClearPinOutput(kGpioTempIndicatorLED); //turn off   kGpioTempIndicatorLED
GPIO_DRV_SetPinOutput(kGpioDoorLockCtrl); //turn on
GPIO_DRV_ClearPinOutput(kGpioDoorLockCtrl); //turn off
Tiger

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

580件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi Tiger,

1. To set a pin as output, there are 3 steps. a) set pin mux; b) set this port as output; c) set pin value.

So, before GPIO_DRV_SetPinOutput(), there should be a GPIO_DRV_SetPinDir().

2. /Reset pin is a special pin. You should disable it by programming FTFA_FOPT[RESET_PIN_CFG].

Regards,

Jing

0 件の賞賛
返信

580件の閲覧回数
tigerlo
Contributor III

Jing,

    Thanks for help, I solved this issue.

Tiger

0 件の賞賛
返信