This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

RTT freeze after writing to UICR

I have a test suite connecting to a nRF52832dk using RTT. This one test writes random data to the UICR config area, resets the chip, then reads back the config.

When running this test only, all is fine. So is running the test several times in a row.

However, when I run any other of my tests before the config test, it freezes. I could narrow it down to MultiAPI.rtt_write() in pynrfjprog returning 0, RTT seems not accessible.

In the working situation (testing only UICR config), the command passed through RTT sends the first 15 bytes, then 2 extra. This is as expected, given the default size of the RTT buffer.

However, when the config test fails, the first 15 bytes are passed (15 is returned by the function rtt_write()), but the 2 following bytes are not (0 is returned by the function rtt_write()). No further bytes can be sent, even after reflashing the firmware. Hard reset is required.

To summarize, the RTT seems to have troubles running after a config set, until hard reset. This only happens after running other tests first, but I cannot find out why. My question is: what could possibly make the RTT stop flushing its buffer, or fail to write?

Related