[SOLVED] PSoC6 (CY8C6XX7_CM0P_TM), cannot read SFLASH area with J-Link 7.68 and newer (7.66g and older work as expected)

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

  • [SOLVED] PSoC6 (CY8C6XX7_CM0P_TM), cannot read SFLASH area with J-Link 7.68 and newer (7.66g and older work as expected)

    Hello,

    I have ran into issue with J-Link 7.68 (and newer, including 7.88e) and Infineon PSoC6. With newer J-Link versions, I'm not able to read SFLASH after successful connection to target.

    Logs from 7.66g, reading 0x16000600 in SFLASH area works:

    Source Code

    1. SEGGER J-Link Commander V7.66g (Compiled Jul 7 2022 10:37:30)
    2. DLL version V7.66g, compiled Jul 7 2022 10:35:46
    3. Connecting to J-Link via USB...O.K.
    4. Firmware: J-Link V11 compiled May 23 2023 14:44:38
    5. Hardware version: V11.00
    6. S/N: 851003787
    7. License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    8. USB speed mode: High speed (480 MBit/s)
    9. VTref=1.819V
    10. Type "connect" to establish a target connection, '?' for help
    11. J-Link>power on
    12. J-Link>connect
    13. Please specify device / core. <Default>: CY8C6XX7_CM4
    14. Type '?' for selection dialog
    15. Device>CY8C6XX7_CM0P_TM
    16. Please specify target interface:
    17. J) JTAG (Default)
    18. S) SWD
    19. T) cJTAG
    20. TIF>s
    21. Specify target interface speed [kHz]. <Default>: 4000 kHz
    22. Speed>
    23. Device "CY8C6XX7_CM0P_TM" selected.
    24. Connecting to target via SWD
    25. ConfigTargetSettings() start
    26. *****************************************************************
    27. JLinkScript: Start 'ConfigTargetSettings' for Cortex-M0+ of CY8C6xx6/CY8C6xx7
    28. *****************************************************************
    29. ConfigTargetSettings() end
    30. InitTarget() start
    31. InitTarget() end
    32. Found SW-DP with ID 0x6BA02477
    33. DPIDR: 0x6BA02477
    34. CoreSight SoC-400 or earlier
    35. AP map detection skipped. Manually configured AP map found.
    36. AP[0]: MEM-AP (IDR: Not set)
    37. AP[1]: AHB-AP (IDR: Not set)
    38. AP[2]: AHB-AP (IDR: Not set)
    39. AP[1]: Core found
    40. AP[1]: AHB-AP ROM base: 0xF0000000
    41. CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
    42. Found Cortex-M0 r0p1, Little endian.
    43. FPUnit: 4 code (BP) slots and 0 literal slots
    44. CoreSight components:
    45. ROMTbl[0] @ F0000000
    46. [0][0]: E00FF000 CID B105100D PID 000BB4C0 ROM Table
    47. ROMTbl[1] @ E00FF000
    48. [1][0]: E000E000 CID B105E00D PID 000BB008 SCS
    49. [1][1]: E0001000 CID B105E00D PID 000BB00A DWT
    50. [1][2]: E0002000 CID B105E00D PID 000BB00B FPB
    51. [0][1]: F0002000 CID B105900D PID 000BB9A6 ???
    52. [0][2]: F0003000 CID B105900D PID 001BB932 MTB-M0+
    53. Cortex-M0 identified.
    54. J-Link>mem32 0x16000600 2
    55. 16000600 = 188AEA98 012F3824
    56. J-Link>
    Display All



    Logs from 7.68, reading 0x16000600 in SFLASH area fails:

    Source Code

    1. SEGGER J-Link Commander V7.68 (Compiled Jul 14 2022 16:49:29)
    2. DLL version V7.68, compiled Jul 14 2022 16:47:42
    3. Connecting to J-Link via USB...O.K.
    4. Firmware: J-Link V11 compiled May 23 2023 14:44:38
    5. Hardware version: V11.00
    6. J-Link uptime (since boot): 0d 00h 00m 17s
    7. S/N: 851003787
    8. License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    9. USB speed mode: High speed (480 MBit/s)
    10. VTref=1.822V
    11. Type "connect" to establish a target connection, '?' for help
    12. J-Link>connect
    13. Please specify device / core. <Default>: CY8C6XX7_CM0P_TM
    14. Type '?' for selection dialog
    15. Device>
    16. Please specify target interface:
    17. J) JTAG (Default)
    18. S) SWD
    19. T) cJTAG
    20. TIF>s
    21. Specify target interface speed [kHz]. <Default>: 4000 kHz
    22. Speed>
    23. Device "CY8C6XX7_CM0P_TM" selected.
    24. Connecting to target via SWD
    25. ConfigTargetSettings() start
    26. ConfigTargetSettings() end
    27. InitTarget() start
    28. InitTarget() end
    29. Found SW-DP with ID 0x6BA02477
    30. DPIDR: 0x6BA02477
    31. CoreSight SoC-400 or earlier
    32. AP map detection skipped. Manually configured AP map found.
    33. AP[0]: MEM-AP (IDR: Not set)
    34. AP[1]: AHB-AP (IDR: Not set)
    35. AP[2]: AHB-AP (IDR: Not set)
    36. AP[1]: Core found
    37. AP[1]: AHB-AP ROM base: 0xF0000000
    38. CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
    39. Found Cortex-M0 r0p1, Little endian.
    40. FPUnit: 4 code (BP) slots and 0 literal slots
    41. CoreSight components:
    42. ROMTbl[0] @ F0000000
    43. [0][0]: E00FF000 CID B105100D PID 000BB4C0 ROM Table
    44. ROMTbl[1] @ E00FF000
    45. [1][0]: E000E000 CID B105E00D PID 000BB008 SCS
    46. [1][1]: E0001000 CID B105E00D PID 000BB00A DWT
    47. [1][2]: E0002000 CID B105E00D PID 000BB00B FPB
    48. [0][1]: F0002000 CID B105900D PID 000BB9A6 ???
    49. [0][2]: F0003000 CID B105900D PID 001BB932 MTB-M0+
    50. SetupTarget() start
    51. ****************************************************
    52. ** Silicon: 0xE208, Family: 0x100, Rev.: 0x24 (B3)
    53. ** Flash Boot version: 1.20.1.45
    54. ** Chip Protection: NORMAL
    55. ****************************************************
    56. SetupTarget() end
    57. Cortex-M0 identified.
    58. J-Link>mem32 0x16000600 2
    59. Could not read memory.
    60. J-Link>
    Display All
    However reading 0x0800000 work on both versions as is expected:

    Source Code

    1. J-Link>mem32 0x16000600 2
    2. Could not read memory.
    3. J-Link>mem32 0x08000000 1
    4. 08000000 = 5C8422BD
    5. J-Link>


    Is there anyway to make reading SFLASH work with newer versions?

    -Jussi