Skip to main content
Associate II
July 17, 2024
Solved

How can I permanently write values into the registers of the VL6180x?

  • July 17, 2024
  • 2 replies
  • 1395 views

How can I permanently write values into the registers of the VL6180x? I tried modifying the loadSettings() in begin(), such as changing the value at 0x0041 to 0x60 and then marking it. However, after repowering, the value at 0x0041 in the VL6180x reverts to 0. Does this mean that the register is volatile memory? Or how should I modify the NVM to write the values I want?

Thanks in advance.

Best answer by John E KVAM

TDK is correct. There is no user accessible non-volatile memory in the sensor.  Once the sensor leaves the factory everything is locked down solid. 

- john

2 replies

TDK
Super User
July 17, 2024

The NVM holds some configuration values. They are retained for the registers that the datasheet says they're retained on, which is not all registers. For example, here is one register that is retained:

TDK_0-1721221630107.png

 

The datasheet doesn't show a register at 0x0041.

 

Generally, you have to reconfigure the chip at startup.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate II
July 20, 2024

Even if I write a value of 0x60 into a register, such as 0x040, it resets to the default value after power cycling. I can't find any software process that overwrites this address. I've tried all register addresses and they all get overwritten. I would like to ask if there is a way to permanently write to a register without it being overwritten.

Andy_Chien_0-1721464431169.png

 

Thanks in advance. 

TDK
Super User
July 20, 2024

For register 0x040, the reset value is 0x0. There is no way to change this.

"If you feel a post has answered your question, please click ""Accept as Solution""."
John E KVAM
John E KVAMBest answer
ST Employee
July 22, 2024

TDK is correct. There is no user accessible non-volatile memory in the sensor.  Once the sensor leaves the factory everything is locked down solid. 

- john