We have already designed, build, assembled and program a board with an FXPS7115D4 using the I2C link, and it works well. Now we have designed, build and assembled a new board with an FXPS7115D4 using the SPI link. The main problem is that I do not manage to read the sensor data. Previously, using I2C, reading registers 62h and 63h was ok. Now, using SPI, I got 16 bit values very close to 0000h or to FFFFh (e.g. 64FFFE1Eh, 64FFFF31h, 640000CBh, ...). On the other side I can read the temperature register (address 0Eh), and the returned value looks correct.
- Went something wrong during the initialisation ?
- Do I need to use the "Sensor data request command" instead of the register read? I cannot understand what the "SOURCEID" is, and how to use it. A use case would be appreciated.
- Without https://community.nxp.com/t5/Sensors/FXPS7115D4/m-p/1310520 I would never have found the AN12731, which helped me a lot for the CRC calculation. Thank you @Fast !
- In AN12731, I think the line u32_cmd_msg |= ((RegisterData << & 0xF0000000); should be replaced by u32_cmd_msg |= ((RegisterData << & 0xFF00);
- In FXPS7115D4 data sheet, "7.5.5.3 SPI error", "The number of SCLK rising edges detected while SS_B is asserted is not equal to 16" should be 32???
Thank you