Hi,
I evaluating the NVM of product BMP581 and struggle with the reading procedure.
I followed instructions in datasheet and this is my Python code:
self.writeRegister(0x37,int(f'11000000',2)) # Switch to standby
time.sleep(0.1)
x28 = format(self.readRegister(0x28),"08b") # Read status
if x28[4:7]=='001': # No error and ready
for reg in range(0x26, 0x22, -1😞
#print(f'Loop {reg} Register {0x00+reg}')
self.writeRegister(0x2B,int(reg)) # Write address
self.writeRegister(0x7F,int(0x5D)) # Write first read command
self.writeRegister(0x7F,int(0xA5)) # Write second read command
#time.sleep(0.1)
x28 = format(self.readRegister(0x28),"08b") # Read status
if x28[4:7]=='001': # No error and ready
NVM1 = format(self.readRegister(0x2C),"08b") # Read register
NVM2 = format(self.readRegister(0x2D),"08b") # Read register
uid= uid + NVM2 + NVM1
print(f'Register {hex(reg)} read {NVM1} {NVM2}!')
else:
print(f'NVM read {hex(reg)} not ready')
else:
print(f'NVM not ready')
All readings from the registers 0x2C and 0x2D always 0x00. What is wrong?
Kind regards,
Jule