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

Incorrect value displayed on system viewer window

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

Parents
  • 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.

Reply
  • 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.

Children
No data