This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARMv8 Writing and reading to/from Debug Data Transfer Register

Hello,

I am working on ARM-Cortex-M and i am trying to get the values currently stored in registers <Xt>. To test this, i want to write a random value to X3 and attempt a read.

As i understand, this should be possible by performing the following operations:

  • MOV X3, #0x100000000
  • MSR DBGDTRTX_EL0, X3
  • Read the 'DBGDTRTX_EL0, Debug Data Transfer Register, Transmit' debug register at offset 0x08C

However doing this i do not see the expected data, is this process correct?

Parents
  • Was MDCCSR_EL0.TXfull (which is an alias of EDSCR.TXfull) clear before you wrote DBGDTRTX_EL0?  And did it become set after the write?

    I suspect you might be missing some barriers.  I'd expect a sequence along the lines of:

    • Poll for MDCCSR_EL0.TXfull to be 0.
    • Write DBGDTRTX_EL0
    • ISB
    • Poll for MDCCSR_EL0.TXfull to be 1.
    • DSB
    • Read memory mapped register
Reply
  • Was MDCCSR_EL0.TXfull (which is an alias of EDSCR.TXfull) clear before you wrote DBGDTRTX_EL0?  And did it become set after the write?

    I suspect you might be missing some barriers.  I'd expect a sequence along the lines of:

    • Poll for MDCCSR_EL0.TXfull to be 0.
    • Write DBGDTRTX_EL0
    • ISB
    • Poll for MDCCSR_EL0.TXfull to be 1.
    • DSB
    • Read memory mapped register
Children
No data