Hi all,
I'm currently trying to integrate the CH201 eval module with an nRF2840 feather board from Adafruit (Arduino compatible). I've written the required functions for the bsp and run into problems during the setup. Like several other users, I was initially running into problems in the get_locked_state function but as I did some more testing, I traced the root of the problem to the chbsp_i2c_mem_read function in the bsp that I wrote.
As specified by the chirp_bsp.h documentation, this function first writes the register address of the CH201 memory that it wants to access, then sends a read request. However, I have observed that this behavior is not executing as expected. The master sends the CH201's I2C address with a write bit, which is successfully acknowledged. However, when it sends the register address, it is not acknowledged by the CH201. Then, when the read request is sent, the CH201 simply sends back empty bytes.
I've traced a few different bugs back to this same function and in each case the register address is not acknowledged, then the sensor reads back empty bytes. Does anyone have any experience with this issue or advice on how to proceed? Thanks!
Hi, Could you check your target platform I2C clock setting? if anything about I2C clock stretch, please try to enable the clock stretch feature. it will be used for the long packet transfer in chx01.