[SOLVED] JLINK_PIN_Override() conflicts with JLINK_JTAG_WriteIR()

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

  • [SOLVED] JLINK_PIN_Override() conflicts with JLINK_JTAG_WriteIR()

    Hi,

    We are using JLINK_PIN_Override() when perform unlocking of Secure JTAG on Cortex M7 (NXP iMX RT1050)
    To unlock Secure JTAG Controller (SJC), we need to set JTAG_MOD=1, then perform some actions, then set JTAG_MOD=0
    But we can't keep HIGH level on pin 17, because first instruction JLINK_JTAG_WriteIR() resets pin to "RELEASE" state.

    Our Default.JLinkScript :

    C Source Code: Default.JLinkScript

    1. U32 _aPINMode[8]; // [0]=3, [1]=5, [2]=7, [3]=9, [4]=11, [5]=13, [6]=15, [7]=17
    2. U32 _aPINState[8]; // input: 0 for LOW, 1 for HIGH
    3. // ... initialization ...
    4. // Set pin JTAG_MOD => 1
    5. _aPINMode[7] = JLINK_PIN_OVERRIDE_MODE_PIO_OUT_HIGH;
    6. r = JLINK_PIN_Override(&_aPINMode[0], &_aPINState[0]);
    7. JLINK_SYS_Sleep(1000);
    8. // ... at this moment we can see on oscilloscope HIGH level on JTAG_MOD (pin 17 on connector)
    9. // ... initialization ...
    10. JLINK_JTAG_WriteIR(0xC); // Output Challenge instruction
    11. // ... at this moment we can see on oscilloscope LOW level on JTAG_MOD (pin 17 on connector)
    12. // ... but we except HIGH level
    13. // ... challenge-response procedure ...
    14. // Set pin JTAG_MOD => 0
    15. _aPINMode[7] = JLINK_PIN_OVERRIDE_MODE_PIO_OUT_LOW;
    16. r = JLINK_PIN_Override(&_aPINMode[0], &_aPINState[0]);
    17. JLINK_SYS_Sleep(100);
    18. // ... now we expect LOW level on JTAG_MOD pin, but it became LOW before challenge-response procedure, and we got fail ...
    19. return 0;
    Display All

    Our question: how we can set pin 17 to HIGH level, and not reset this pin after JLINK_JTAG_WriteIR() instruction?
  • Hello Yuriy,

    Could you please send us the serial number of your J-Link?

    Best regards
    Erik
    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.
  • Quick update:
    I just noticed that you issued a support request through our official channel.
    We will proceed this request there and consider this form thread as closed.

    -- CLOSED --


    BR
    Erik
    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.