Hello!
I have been trying to use the CH201 and CH101 sensors with a custom board.
I am able to achieve communication with sensor and do the initialize process until the chdrv_wait_for_lock function, which my setup is not able to perform. Also, it seems the device address does not change accordingly, as expected.
Due to the fact that the previous steps works, is it possible to conclude that it is not a hardware problem?
I have seen other people with the same problem, does anyone know how to solve? Can it have any relation with the INT pin?
Thank you for the support!
I've had the same problem. If you look at how the 'chdrv_wait_for_lock()' function is implemented, it uses the 'chbsp_timestamp_ms()' to check the timeout. Althoug this function is marked as OPTIONAL for the bare minimum bsp implementation, instead is REQUIRED.
I'm trying to develop the BSP for the NRF52 but with no success. The firmware flash and the sensors respond to my requests but the distance it read is stucked always at the same value (different at each run). Also I'm noticing the famous "No INT pulse" problem.
If you are lucky please share the solution!
Thank you for the answer!
Unfortunately the chbsp_timestamp_ms() is already implemented. We are reviewing our hardware to ensure it is working properly, but still no success to get everything working as expected.
I will make an update here if anything changes, I will be thankful if you share too if solved.
Hi guys. I was also trying to implement CH201 using nrf52. Looks like I am stuck on that function. But when I run my code until measuring section, it 'looks' like works because the variable was changed but not know is it true or not. I will have to validate the value first. Anwyway, anybody got solution for this? Thank you.
I increase the timeout to 50000 and it compete this function.
Yes, chbsp_timestamp_ms and chbsp_delay_ms are both needed. You also can try to extend the MACRO: CHDRV_FREQLOCK_TIMEOUT_MS to 200 or 300 (in ch_driver.h)