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
  • From the reference manual: 

    The data register is split into 2 buffers - one for writing (Transmit Buffer) and another one for reading (Receive buffer). A write to the data register will write into the Tx buffer and a read from the data register will return the value held in the Rx buffer.

    So, you cannot expect to read what you have written into DR.

Reply
  • From the reference manual: 

    The data register is split into 2 buffers - one for writing (Transmit Buffer) and another one for reading (Receive buffer). A write to the data register will write into the Tx buffer and a read from the data register will return the value held in the Rx buffer.

    So, you cannot expect to read what you have written into DR.

Children