KL02 SWD_DIO or SWD_CLK

cancel
Showing results for 
Search instead for 
Did you mean: 

KL02 SWD_DIO or SWD_CLK

Jump to solution
1,181 Views
patrickirwin
Contributor I

We are currently using MKL02Z16VFG4 (16 pin device) in a new
design.  In this design we are using all
of the pins except for pin 16 (PTA2/SWD_DIO) and pin 14 (PTA0/SWD_CLK).  After programming, we need to use one of
these pins to drive an N-Channel MOSFET, which is being used as a switch.  The N-Channel MOSFET has a pull down 10K ohm
resistor from its gate to ground. 

Which pin should we be using?    

Thanks

Pat

Tags (4)
0 Kudos
1 Solution
207 Views
martynhunt
NXP Employee
NXP Employee

Hi Pat,

On reset the KL02 enables a pull-up on PTA2/SWD_DIO, and a pull-down on PTA0/SWD_CLK. Therefore, until you change the mux and/or pull-up/down settings in your code, PTA0 & PTA2 are set correctly for programming.

Also, the KL02 does not feature JTAG. All programming/debugging is performed via SWD (Serial Wire Debug) and your IAR I-JET is capable of programming/debugging over SWD.

Best regards,

Martyn

View solution in original post

0 Kudos
4 Replies
207 Views
martynhunt
NXP Employee
NXP Employee

Hi Pat,

Both pins can be used. The differences between the two pins are:

PTA0 has interrupt requests; PTA2 does not.

PTA0 does not have an internal pull-up. PTA2 does.

So if you need to add an interrupt driven input later, use PTA2 for switching the MOSFET to leave PTA0 available.

Best regards,

Martyn

207 Views
patrickirwin
Contributor I

Martyn,

Does the PTA2/SWD_DIO require a pull-up?  The IAR I-JET states when using J-TAG “This pin should be pulled up on target”.

While for PT0/SWD_CLK pin says that when using J-TAG “It is recommended that this pin is pulled to a defined state on target board”. 

If we need a pull-down to the MOSFET, we should use the PTA2/SWD_DIO.  We are using J-TAG for programming.

Thanks

Pat  

0 Kudos
208 Views
martynhunt
NXP Employee
NXP Employee

Hi Pat,

On reset the KL02 enables a pull-up on PTA2/SWD_DIO, and a pull-down on PTA0/SWD_CLK. Therefore, until you change the mux and/or pull-up/down settings in your code, PTA0 & PTA2 are set correctly for programming.

Also, the KL02 does not feature JTAG. All programming/debugging is performed via SWD (Serial Wire Debug) and your IAR I-JET is capable of programming/debugging over SWD.

Best regards,

Martyn

View solution in original post

0 Kudos
207 Views
patrickirwin
Contributor I

Martyn,

Thanks for your help.

Pat

0 Kudos