[SOLVED] J-link Ultra+ cannot read some register in Kinetis K64?

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

  • [SOLVED] J-link Ultra+ cannot read some register in Kinetis K64?

    Hi,
    I have a J-Link Ultra+ and I can successfully write the flash and debug an application on NXP Kinetis K64.
    The problem is accessing registers of some peripheral like FTM0, while other peripheral like PIT can be read.

    The trace of J-Link Commander is

    Source Code

    1. max@resfw04:/opt/SEGGER/JLink$ ./JLinkExe
    2. SEGGER J-Link Commander V5.10i (Compiled Jan 28 2016 09:41:48)
    3. DLL version V5.10i, compiled Jan 28 2016 09:41:43
    4. Connecting to J-Link via USB...Updating firmware: J-Link Ultra V4 compiled Jan 21 2016 18:49:46
    5. Replacing firmware: J-Link Ultra V4 compiled Sep 4 2015 18:12:49
    6. Waiting for new firmware to boot
    7. New firmware booted successfully
    8. O.K.
    9. Firmware: J-Link Ultra V4 compiled Jan 21 2016 18:49:46
    10. Hardware version: V4.00
    11. S/N: 504400379
    12. License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    13. Emulator has Trace capability
    14. VTref = 3.401V
    15. Type "connect" to establish a target connection, '?' for help
    16. J-Link>device MK64FN1M0xxx12
    17. Please specify target interface:
    18. J) JTAG (Default)
    19. S) SWD
    20. TIF>s
    21. Specify target interface speed [kHz]. <Default>: 4000 kHz
    22. Speed>1000
    23. Device "MK64FN1M0XXX12" selected.
    24. Found SWD-DP with ID 0x2BA01477
    25. Found SWD-DP with ID 0x2BA01477
    26. Found Cortex-M4 r0p1, Little endian.
    27. FPUnit: 6 code (BP) slots and 2 literal slots
    28. CoreSight components:
    29. ROMTbl 0 @ E00FF000
    30. ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
    31. ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
    32. ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
    33. ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
    34. ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
    35. ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
    36. ROMTbl 0 [6]: FFF43000, CID: B105900D, PID: 003BB907 ETB
    37. ROMTbl 0 [7]: FFF44000, CID: B105900D, PID: 001BB908 CSTF
    38. Cortex-M4 identified.
    39. J-Link>mem32 0x40038000,1
    40. Could not read memory.
    41. J-Link>mem32 0x40037000,1
    42. 40037000 = 00000001
    43. J-Link>
    Display All


    I can read address 0x40037000 (MCR register of PIT peripheral) but I cannot read 0x40038000 (SC register of FTM0 peripheral)

    How can I solve this issue?

    best regards
    MAx
  • Hi Max,

    sorry for the delay in response.
    the peripheral cannot be read if the peripheral is not powered. Once it is powered, the peripheral can be read. (Check the documentation for the SIM_SCGC1, SIM_SCGC2, SIM_SCGCx.... registers in order to power up peripherals)

    Source Code

    1. Example:
    2. J-Link>mem32 0x40037000, 1
    3. Could not read memory. // Powered down, cannot be read
    4. J-Link>mem32 0x40038000,1
    5. Could not read memory. // Powered down, cannot be read
    6. J-Link>mem32 0x40048030, 1
    7. 40048030 = 00000000 // every peripheral controlled by this register is disabled
    8. J-Link>w4 0x40048030, 0x0B000000
    9. Writing 0B000000 -> 40048030
    10. J-Link>mem32 0x4004803c, 1
    11. 4004803C = 40000001 // only RTC and FTF are enabled
    12. J-Link>w4 0x4004803C, 0x0FE40001
    13. Writing 0FE40001 -> 4004803C
    14. J-Link>mem32 0x40037000, 1
    15. 40037000 = 00000002 // Peripheral powered, can be read
    16. J-Link>mem32 0x40038000,1
    17. 40038000 = 00000000 // Peripheral powered, can be read
    18. J-Link>
    Display All


    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.