Hello
I think I know what is going on:
- JTAG supports Boundary Scan (used to check circuit board connections). SWD (Serial Wire Debug) does not.
- Other than this - SWD performance is more or less the same as JTAG. In Keil uVision, SWD = SW.
- SWD is only 2 signals compared to 4 or 5 on JTAG. So - motivated to use SWD only to save pins.
- The chip designer (NXP in this case) can select JTAG OR SWD or both. Cortex-M0 must pick one.
- Keil uVision detects both JTAG and SWD in the SWJ macrocell - but JTAG cannot connect to the Cortex-M4 CoreSight debug module. SWD can.
- So: I think the NXP designer uses JTAG only for Boundary Scan and not for debugging.
- So: Use SWD for debugging. This will not cause any problems.
NOTE: Using the S32K-144 on-board OpenSDA in CMSIS-DAP mode: only SWD works - JTAG returns an RDDI error. I think it is common for CMSIS-DAP implementations to use only SWD.
The next time I bump into a NXP designer I will ask him/her for confirmation...
Bob Boys
Arm/Keil