[nRF5340] Network core AHB_AP Debug Base Address bit[0] not set

When trying to figure out why we couldn't flash the network core on the nRF5340 with pyOCD, we noticed that the Debug Base Address of the AHB_AP returns 0xe00fe002 for the network core. The application core's AHB_AP returns 0xe00fe003. If I understand the CoreSight SoC-400 manual correctly, bit[0] of that register indicates that the access port is available for use by a debugger (table 4-214, page 256). If this bit is 0, pyOCD ignores the port and thus the (network) core completely. It seems to us that this bit should be 1, and that the read of that register should thus return 0xe00fe003.

As far as I can see, this value is set by hardware and can not be written by software, so this seems like a hardware bug, or is our interpretation of the definition of that register wrong?

Parents
  • Hi Tom,
    Thanks for reaching out. I’m not seeing the nRF5340 listed among the available pyOCD targetsCould you share the exact commands you’re running, along with the logs or error messages you’re seeing?

    Best regards,

    Benjamin

  • Indeed, pyOCD does not support the nRF5340 out of the box. Instead we're using the relevant CMSIS pack (nRF_DeviceFamilyPack) and are trying to get it to work ourselves.

    However, while doing this, we've found the output of the Debug Base Address register to be different from our expectations. More specifically, when reading this register in the pyOCD function _init_rom_table_base (pyocd/coresight/ap.py:851), we find that both cores return different values, as described in our original post. The value returned from the network core seems to be wrong.

    We feel that the behaviour of pyOCD is incidental and not important to our question.

Reply
  • Indeed, pyOCD does not support the nRF5340 out of the box. Instead we're using the relevant CMSIS pack (nRF_DeviceFamilyPack) and are trying to get it to work ourselves.

    However, while doing this, we've found the output of the Debug Base Address register to be different from our expectations. More specifically, when reading this register in the pyOCD function _init_rom_table_base (pyocd/coresight/ap.py:851), we find that both cores return different values, as described in our original post. The value returned from the network core seems to be wrong.

    We feel that the behaviour of pyOCD is incidental and not important to our question.

Children
Related