Hi everyone,
I'm trying to use LPSPI4's DMR0 / DMR1 data match registers as transient storage, but it seems as though I'm missing something really obvious. Here's my startup test code (note that this deliberately doesn't trigger software reset (CR bit 1), because I want to see if DMR0 persists over reboot):
#define MYSPI LPSPI4
MYSPI->CR = 0x1 + 0x8; // enable module (but don't reset it!)
printf("DMR0 Persistence test: 0x%08x\r\n", (unsigned int)(MYSPI->DMR0));
MYSPI->DMR0 = 0x12345678;
printf("DMR0 Readback test: 0x%08x\r\n", (unsigned int)(MYSPI->DMR0));
This is outputting:
DMR0 Persistence test: 0x00000000
DMR0 Readback test: 0x00000000
What have I got wrong here?
Thanks, Nick
cc: @jeremyzhou