Hi,
I'm using a STM32F4 Discovery board which has a STM32F407VG with a LIS3DSH accelerometer which is connected by SPI. I'm trying to read a register from the accelerometer and I tried writing the address of the register to SPI->DR. But SPI->DR shows an incorrect value in the System Viewer window and in the Memory window. I have attached a picture with the corresponding portions highlighted in yellow.
Is this an issue with Keil or a Microcontroller side issue?
Thanks
And note that this is very common throughout all types of microcontrollers - and, in fact, digital electronics in general.
Although these "Special-Function Registers" (SFRs) are memory-mapped, they are not memory! they are connections to hardware.
Bottom line: never assume that any SFR will read-back what you just wrote to it.