[SOLVED] JLINK_CORESIGHT_WriteDP parameter

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

  • [SOLVED] JLINK_CORESIGHT_WriteDP parameter

    Hello Segger Team,


    I try to understand a JinkScript for the iMXRT685 which comes with the SDK from NXP.

    They call JLINK_CORESIGHT_WriteDP like this:

    Source Code

    1. JLINK_CORESIGHT_WriteDP(2, 0x020000f0);



    According your documentation, the first parameter can be one of

    • JLINK_CORESIGHT_DP_REG_IDCODE
    • JLINK_CORESIGHT_DP_REG_ABORT
    • JLINK_CORESIGHT_DP_REG_CTRL_STAT
    • JLINK_CORESIGHT_DP_REG_SELECT
    • JLINK_CORESIGHT_DP_REG_RDBUF
    • JLINK_CORESIGHT_AP_REG_CTRL
    • JLINK_CORESIGHT_AP_REG_ADDR
    • JLINK_CORESIGHT_AP_REG_DATA
    • JLINK_CORESIGHT_AP_REG_BD0
    • JLINK_CORESIGHT_AP_REG_BD1
    • JLINK_CORESIGHT_AP_REG_BD2
    • JLINK_CORESIGHT_AP_REG_BD3
    • JLINK_CORESIGHT_AP_REG_ROM
    • JLINK_CORESIGHT_AP_REG_IDR

    Which of those constants is related to the Index two?


    Thanks and regards
  • Hi,
    Thank you for your inquiry.

    Usually, this would be JLINK_CORESIGHT_DP_REG_SELECT.

    Best regards,
    Fabian
    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 Fabian,


    thank you for your feedback.


    What do you mean with usually? Is this dependent to the used controller?

    NXP is using ‘JLINK_CORESIGHT_WriteDP’ regular with a number instead of the symbolic constants, therefore is it possible to get a full list with the relates indices?


    Thanks, and best regards
  • Hi,
    Sorry this was a Typo.

    For DP, RegIndex "2" is always JLINK_CORESIGHT_DP_REG_SELECT.

    RegIndex specifies the index of the DP register.
    The DP registers and the related indexes are documented by ARM.
    Currently you would have to look them up in the ARM documentation.

    I will check internally if we want to add the define values to the documentation.

    Best regards,
    Fabian
    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 Fabian,


    the Indexes you are using for JLINK_CORESIGHT_WriteDP seems not to be related to the addresses of the registers which you can find in the ARM specification.
    Compare developer.arm.com/documentatio…tation-specific-registers


    The Register Addresses are

    Address
    Read
    Write
    0x00
    IDCODE
    ABORT
    0x04
    CTRL/STAT
    CTRL/STAT
    0x08
    RESEND
    SELECT
    0x0C
    RDBUFF
    N/A




    Therefore, it would be good to have the values in the documentation

    Best regards
  • Hi,
    That is why I did not write "Address" but "Index".

    Address / 4 = Address or:
    Index * 0x4 = Address =>
    For Write:
    Index 0 => 0x0 ABORT
    Index 1 => 0x4 CTRL/STAT
    Index 2 => 0x8 SELECT
    Index 3 => N/A

    Best regards,
    Fabian
    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,
    This is very understandable.
    I am sorry for not being clear enough.

    Do you have any further questions regarding this?

    Best regards,
    Fabian
    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,

    We will close this thread now.

    Best regards,
    Fabian
    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.