[SOLVED] JTAG error on Raspberry Pi 2 memory access

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

  • [SOLVED] JTAG error on Raspberry Pi 2 memory access

    Hi all,
    I am trying to connect to the RPi2 JTAG.
    I have the following setup
    - Raspberry Pi 2 running Raspbian 8.0 (Jessie)
    - OpenOCD 0.9.0 with a J-Link EDU connected to a Ubuntu system.

    I setup the GPIO in order to expose the JTAG interface and the JTAG connection works: I can halt/resume processors.
    The issues start whenever I tried to access the memory (with the CPU halted).
    For example

    Source Code

    1. > halt
    2. ttbcr 0ttbr0 378a806attbr1 406a
    3. rpi2.cpu.3 rev 5, partnum c07, arch f, variant 0, implementor 41
    4. number of cache level 2
    5. cache l2 present :not supported
    6. rpi2.cpu.3 cluster f core 3 multi core
    7. target state: halted
    8. target halted in ARM state due to debug-request, current mode: Supervisor
    9. cpsr: 0x60000093 pc: 0x80021868
    10. MMU: enabled, D-Cache: enabled, I-Cache: enabled
    11. > dump_image ram.bin 0x08000 0x1000
    12. timeout waiting for DSCR bit change
    13. in procedure 'cache_config'
    Display All


    Is there anyone aware of this issue?
    Is there anything I can do to dig into the problem? I was thinking about disabling the cache...

    Any help would be appreciated.
    Best
    Alex
  • Hi Alex,

    There is a bug that causes Full-Speed-USB J-Links (V9 and older, J-Link Pro V3 and older) to not work correctly with OpenOCD. (We need to look into this, but at the moment, we assume that has to be fixed on OpenOCD side)

    Could please open and make a screenshot of J-Link Commander (JLinkExe)?

    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.
  • Hi Niklas,
    as per your suggestion I launched JLinkExe (V6.00g).
    As soon I connected the J-Link device it upgraded the J-Link firmware (without no possibility to avoid this)

    Source Code

    1. Connecting to J-Link via USB...Updating firmware: J-Link V9 compiled Aug 17 2016 11:20:49
    2. Replacing firmware: J-Link V9 compiled Oct 9 2015 20:34:47
    3. Waiting for new firmware to boot
    4. New firmware booted successfully
    5. O.K.
    6. Firmware: J-Link V9 compiled Aug 17 2016 11:20:49
    7. Hardware version: V9.30


    After the upgrade I wasn't able to get the device working

    1) JlinkExe doesn't found any chain (HW setup as before with OpenOCD)

    Source Code

    1. Type "connect" to establish a target connection, '?' for help
    2. J-Link>connect
    3. Please specify device / core. <Default>: Unspecified
    4. Type '?' for selection dialog
    5. Device>?
    6. Please specify target interface:
    7. J) JTAG (Default)
    8. S) SWD
    9. F) FINE
    10. I) ICSP
    11. C) C2
    12. TIF>J
    13. Device position in JTAG chain (IRPre,DRPre) <Default>: -1,-1 => Auto-detect
    14. JTAGConf>
    15. Specify target interface speed [kHz]. <Default>: 4000 kHz
    16. Speed>1000
    17. No valid device has been selected.
    Display All


    How can I specify the JTAG chain?
    In openOCD I have a working config if that can be helpful.

    2) The J-Link device doesn't work with OpenOCD anymore due to USB errors X(

    Source Code

    1. Info : J-Link V9 compiled Aug 17 2016 11:20:49
    2. Info : J-Link caps 0xb9ff7bbf
    3. Info : J-Link hw version 93000
    4. Info : J-Link hw type J-Link
    5. Info : J-Link max mem block 69952
    6. Info : J-Link configuration
    7. Info : USB-Address: 0x0
    8. Info : Kickstart power on JTAG-pin 19: 0xffffffff
    9. Info : Vref = 3.329 TCK = 0 TDI = 0 TDO = 1 TMS = 0 SRST = 1 TRST = 1
    10. Info : J-Link JTAG Interface ready
    11. Info : clock speed 1000 kHz
    12. Error: usb_bulk_read failed (requested=87, result=0)
    13. Error: jlink_tap_execute failed USB io (-107)
    14. Error: Trying to use configured scan chain anyway...
    15. Error: usb_bulk_write failed (requested=10, result=0)
    16. Error: jlink_tap_execute failed USB io (-107)
    17. Error: usb_bulk_write failed (requested=6, result=0)
    18. Error: jlink_tap_execute failed USB io (-107)
    19. Warn : Bypassing JTAG setup events due to errors
    20. Error: usb_bulk_write failed (requested=92, result=0)
    21. Error: jlink_tap_execute failed USB io (-107)
    22. Error: usb_bulk_write failed (requested=88, result=0)
    Display All


    How can I revert back to the previous firmware?

    Thanks
    Alex
  • How to revert the J-Link firmware is explained in the J-Link User Guide.
    Please note that you are doing this on your own risk and that there is no support given for older firmware versions.


    Best regards
    Alex
    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.
  • Hello Forum,

    the issue regarding OpenOCD + J-Link models with Full Speed USB (V9 and older) has been fixed with the firmware "J-Link V9 compiled Sep 1 2016 18:29:50" or later, which is included in V6.00i or higher of the J-Link software & documentation pack.

    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.
  • SEGGER - Niklas wrote:


    the issue regarding OpenOCD + J-Link models with Full Speed USB (V9 and older) has been fixed with the firmware "J-Link V9 compiled Sep 1 2016 18:29:50" or later, which is included in V6.00i or higher


    Guys, thanks a lot!
    I upgraded the J-Link firmware to the latest version and everything is back to normal with OpenOCD! :thumbsup:
  • SEGGER - Niklas wrote:


    Could please open and make a screenshot of J-Link Commander (JLinkExe)?


    Please find attached a screenshot of JLinkExe; it seems JLinkExe doesn't detect the Raspberry Pi.
    I am sure the connection are fine because I am able to connect with OpenOCD using the same hardware setup.

    Is there anything I can try to make the JLinkExe work with the Pi?

    Thanks for your support.
    Alex
    Images
    • Screen Shot 2016-09-10 at 11.26.48.png

      143.63 kB, 962×862, viewed 686 times
  • Hi Alex,

    as their is no "device specific" support for the Raspberry Pi (BCM 2835/2836/2837), you just need to specify the core, which should be Cortex-A7 for the Raspberry Pi II.

    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.