Unable to program Kinetis K22 devices over JTAG chain

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Unable to program Kinetis K22 devices over JTAG chain

    I am unable to program a Kinetis K22 device over a JTAG chain with the J-Link Basic tool. Do the J-Link MK22FN1M0xxx12 routines support JTAG chains ?

    I have three ARM devices on a JTAG chain and JLinkCommander correctly identifies these devices:

    Source Code

    1. Found 3 JTAG devices, Total IRLen = 12:
    2. #0 Id: 0x4BA00477, IRLen: 04, IRPrint: 0x1, CoreSight JTAG-DP (ARM)
    3. #1 Id: 0x4BA00477, IRLen: 04, IRPrint: 0x1, CoreSight JTAG-DP (ARM)
    4. #2 Id: 0x079264F3, IRLen: 04, IRPrint: 0x1, ARM926EJ-S Core


    The JTAG chain works for debugging. JLinkCommander allows me select each CPU individually on the chain using the "config" command and I can successfully debug/control each CPU.

    Source Code

    1. J-Link>config 4 1
    2. Info: TotalIRLen = 12, IRPrint = 0x0111
    3. Info: Found Cortex-M4 r0p1, Little endian.
    4. Info: FPUnit: 6 code (BP) slots and 2 literal slots
    5. Info: CoreSight components:
    6. Info: ROMTbl 0 @ E00FF000
    7. Info: ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
    8. Info: ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
    9. Info: ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
    10. Info: ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
    11. Info: ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
    12. Info: ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
    13. Info: ROMTbl 0 [6]: FFF43000, CID: B105900D, PID: 003BB907 ETB
    14. Info: ROMTbl 0 [7]: FFF44000, CID: B105900D, PID: 001BB908 CSTF
    15. Found 3 JTAG devices, Total IRLen = 12:
    16. #0 Id: 0x4BA00477, IRLen: 04, IRPrint: 0x1, CoreSight JTAG-DP (ARM)
    17. #1 Id: 0x4BA00477, IRLen: 04, IRPrint: 0x1, CoreSight JTAG-DP (ARM)
    18. #2 Id: 0x079264F3, IRLen: 04, IRPrint: 0x1, ARM926EJ-S Core
    19. Cortex-M4 identified.
    20. J-Link>h
    21. PC = 000063B0, CycleCnt = FCAC4ED9
    22. R0 = 00004348, R1 = A5A5A5A5, R2 = A5A5A5A5, R3 = A5A5A5A5
    23. R4 = A5A5A5A5, R5 = A5A5A5A5, R6 = A5A5A5A5, R7 = A5A5A5A5
    24. R8 = A5A5A5A5, R9 = A5A5A5A5, R10= A5A5A5A5, R11= A5A5A5A5
    25. R12= A5A5A5A5
    26. SP(R13)= 1FFF41E8, MSP= 2000FF98, PSP= 1FFF41E8, R14(LR) = 000063AB
    27. XPSR = 81000000: APSR = Nzcvq, EPSR = 01000000, IPSR = 000 (NoException)
    28. CFBP = 02000000, CONTROL = 02, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
    29. FPS0 = 00000000, FPS1 = 00000000, FPS2 = 00000000, FPS3 = 00000000
    30. FPS4 = 00000000, FPS5 = 00000000, FPS6 = 00000000, FPS7 = 00000000
    31. FPS8 = 00000000, FPS9 = 00000000, FPS10= 00000000, FPS11= 00000000
    32. FPS12= 00000000, FPS13= 00000000, FPS14= 00000000, FPS15= 00000000
    33. FPS16= 00000000, FPS17= 00000000, FPS18= 00000000, FPS19= 00000000
    34. FPS20= 00000000, FPS21= 00000000, FPS22= 00000000, FPS23= 00000000
    35. FPS24= 00000000, FPS25= 00000000, FPS26= 00000000, FPS27= 00000000
    36. FPS28= 00000000, FPS29= 00000000, FPS30= 00000000, FPS31= 00000000
    37. FPSCR= 02000000
    Display All


    When I use the "device MK22FN1M0xxx12" command, I am unable to erase or program the K22 devices on the JTAG chain.

    Source Code

    1. J-Link> device MK22FN1M0xxx12
    2. Info: Device "MK22FN1M0XXX12" selected.
    3. Reconnecting to target...
    4. Info: TotalIRLen = 12, IRPrint = 0x0111
    5. Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFF11
    6. Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFF11
    7. Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFF11
    8. Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFF11
    9. Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFF11
    10. Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFF11
    11. Info: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFF11
    Display All


    When I physically break the chain and connect the J-Link to only a single K22 I am able to program it correctly.

    Can you fix this issue or provide a work around ?
  • No response from Segger Support ?

    Can Segger Suppport please have look into this for me ? I need to know if I have to redesign the board or find another JTAG programmer. This issue has been open for 3 weeks without a response from Segger support. I have also emailed Segger and Segger US for support on this issue but have had no reply.
  • Hello Bill,

    Sorry to hear that your are running into problems.

    I have also emailed Segger and Segger US for support on this issue but have had no reply.

    This should not happen. Sorry for this.
    Can you please let me know the subject of the e-mail, so I can dig where it got lost?

    I suspect the problem is related to the i.mx28 (ARM926EJ-S Core) on the JTAG chain.

    Would it be possible to get a hardware sample from you in order to reproduce the problem?
    Right now, I do not see any reason why it should not work having also an i.MX28 in the chain.
    Unfortunately, we do not have such a setup here in house.


    Best regards
    Alex