I am trying to use the Micro Trace Buffer in the KL27.
If I do:
MTB_MASTER = 0UL; /* Disable MTB */
MTB_POSITION = MTB_BASE; /* Set position to start of RAM */
Reading MTB_POSITION back returns 0x6000 rather than the start of RAM.
MTB_BASE does read as the start of RAM, as expected.
Per the MKL27 datasheet 43.3.1.1 MTB_POSITION should read what is written,
except for the bottom three bits.
Tracing seems to work, other than this odd reading of MTB_POSITION.
What is going on here?