2016-05-03 09:14 AM
Hi,
I'm using a stm32f469 disco board and a x-nucleo-iks01a1 extension board and I'm trying to set some of the control bits. I'm able to read all registers over i2c without any problems. But if i try to write any of the control registers nothing is changed. i also read that i have to enable the sensor by setting the corresponding bit, which of course doesn't work for me either. The sensor is set to one shot mode (which i want to change) and until i disconnect and reconnect the power supply i always get the same value. the temp-value is correct and the sensor changes its reading if i warm the chip up by my finger (and dis-/reconnect the power). I think i read all documentation and i couldn't find any mysterious procedure to go through before configuring the sensor... Cheers, --Jens #hts221 #control-register2016-05-03 10:16 AM
Hi,
Can you send me the sequence of settings that you are using?If you want to use the one shot mode,you have to write 0x80 in CTRL_REG1 (0x20h) or 0x84 (BDU enabled) and in order to start a conversion you have to write 0x01 in CTRL_REG2(0x21h). What is the slave address that you are using?Pay attention : the slave address is BFh for Read I2C transactions and BEh for Write I2C transactions.RegardsAntonella2016-05-04 12:22 AM
Hi,
I'm using C# and .net micro framework, which does most of the i2c-communication. Slave address is 0x5F + R/W-bit --> 0xBE for a write transaction, and 0xBF for a read. And since i'm able to read the registers which involves a write transaction, this seems to be correct. I've checked the data with my oscilloscope and every little bit checks out. WHO_AM_I (0Fh) replies correctly with BCh. AV_CONF (10h): 1Bh CTRL_REG1 (20h): 0h CTRL_REG2 (21h): 0h CTRL_REG3 (22h): 0h STATUS_REG (27h): 0h I tried reading the ctrl_reg first and then write my changes, I tried writing without reading first. On the bus it checks out, the write transmission is acknowledged by the slave but nothing changes. I've seen some examples on the web, even in different programming languages, but when i try the same command sequence nothing changes :\ Thanks for your help, Cheers, --Jens2016-05-04 05:32 AM
2016-05-10 12:23 AM
Hi,
I only have this one example, so i can't try on another one.Edit: I should receive another board within a week. I'll try then and tell you about it. Cheers, --Jens2016-05-23 02:57 AM
Hi,
I finally had the time to try with another sampe. Sadly, it's exactly the same behaviour. The control registers cannot be written >:( Any suggestions? Cheers, --Jens2016-05-23 06:08 AM