DK-CH101 HelloChirp firmware doesn't work properly

By thomasresellel… , 2 November 2020

Just got the DK-CH101 dev kit and had some issues getting it to work with SonicLink. So i reflashed it with the SmartSonic_HelloChirp_v1_11_0 firmware with Atmel Studio without any issues. But when reading from the dev kit through RealTerm, i don't get any sensor readings, see attachment.
I'm reading this through the EDBG USB port at baud 1000000. the FTDI USB does not output anything.

thomasresellel…

5 years 4 months ago

hmm.. doesn't seem like attachment works.

https://imgur.com/6SZwBbo

Image removed.

phpbb Post ID
38707

thomasresellel…

5 years 4 months ago

The switch on the sensor board is toggled to U15 position. Both 1-2 and 3-4 are shorted on J3, and 1-2 and 3-4 are shorted on J1

phpbb Post ID
38709

thomasresellel…

5 years 4 months ago

Seems it reads 0xFFFF from register 0x18
So when time_of_flight == 0xFFFF object is not detected?
https://imgur.com/jCSb74O

But the return value means i2c is working atleast? So something is not right with the initialization of the sensor perhaps?

phpbb Post ID
38710

pedroluzeirowi…

5 years 4 months ago

i've encountered the same issue. both with sonic link software and with the hello chirp example. did you find any workaround?

phpbb Post ID
38730

thomasresellel…

5 years 4 months ago

Unfortunately not.. And the activity on this forum is lacking to say the least.

phpbb Post ID
38743

pedroluzeirowi…

5 years 4 months ago

I've been trying to get in contact with invensense technical support but the only suggestion i got was to flash the firmware with atmel tool instead of the tool provided in the soniclink.

phpbb Post ID
38745

michltriopscz

5 years 1 month ago

Attached CH101 to STM32F0 Discovery board and ported SmartSonic_HelloChirp_v1_11_0 HAL to STM32. I2C communication seems to work according both osciloscope analysis and CH101 triggering interrupts in free running mode - so I'm assunming CH101 firmware is loaded and operational. However data returned look like random garbage (register dump added):


Hello Chirp! - Chirp SonicLib Example Application
Compile time: Feb 2 2021 00:04:45
Version: 1.11.0 SonicLib version: 2.1.2

Initializing sensor(s)...
starting group...
OK

Sensor Type Freq RTC Cal Firmware
0 CH101 176703 Hz 2935@100ms gpr_sr_open_gpr-101_v40a

Checking i2c devices on BUS after programming
Found device on address 0x45

Configuring sensor(s)...
Sensor 0: max_range=250mm mode=FREERUN

Reading control registers
Register CH101_COMMON_REG_OPMODE: 2
Register CH101_COMMON_REG_TICK_INTERVAL: e1
Register CH101_COMMON_REG_PERIOD: 5
Register CH101_COMMON_REG_CAL_TRIG: 0
Register CH101_COMMON_REG_MAX_RANGE: 81
Register CH101_COMMON_REG_TIME_PLAN: 30
Register CH101_COMMON_REG_CAL_RESULT: 77
Register CH101_COMMON_REG_RX_HOLDOFF: a
Register CH101_COMMON_REG_STAT_RANGE: 0
Register CH101_COMMON_REG_STAT_COEFF: 6
Register CH101_COMMON_REG_READY: 2
Register CH101_COMMON_REG_TOF_SF: 2b
Register CH101_COMMON_REG_TOF: 6b
Register CH101_COMMON_REG_AMPLITUDE: 18
Register CH101_COMMON_REG_DATA: 0

Starting measurements
Port 0: Range: 37.2 mm Amp: 8164
Port 0: Range: 84.6 mm Amp: 38439
Port 0: Range: 21.3 mm Amp: 14529
Port 0: Range: 21.3 mm Amp: 15192
Port 0: Range: 46.6 mm Amp: 7031
Port 0: Range: 46.6 mm Amp: 4517
Port 0: Range: 43.1 mm Amp: 8125
Port 0: Range: 44.6 mm Amp: 4471
Port 0: Range: 19.4 mm Amp: 5297
Port 0: Range: 45.1 mm Amp: 4299
Port 0: Range: 44.9 mm Amp: 4299
Port 0: Range: 84.8 mm Amp: 38439
Port 0: Range: 48.5 mm Amp: 4517
Port 0: Range: 38.8 mm Amp: 4997
Port 0: Range: 40.8 mm Amp: 4155
Port 0: Range: 21.3 mm Amp: 6217
Port 0: Range: 19.4 mm Amp: 4861
Port 0: Range: 45.1 mm Amp: 4298
Port 0: Range: 19.4 mm Amp: 6734
Port 0: Range: 19.4 mm Amp: 11435
Port 0: Range: 37.7 mm Amp: 8723
Port 0: Range: 21.3 mm Amp: 6644
Port 0: Range: 64.0 mm Amp: 4398
Port 0: Range: 21.3 mm Amp: 5350
Port 0: Range: 21.3 mm Amp: 4938
Port 0: Range: 44.0 mm Amp: 8338
Port 0: Range: 38.8 mm Amp: 4587
Port 0: Range: 67.9 mm Amp: 4484
Port 0: Range: 45.0 mm Amp: 8124
Port 0: Range: 21.3 mm Amp: 38895
Port 0: Range: 21.3 mm Amp: 39097
Port 0: Range: 46.6 mm Amp: 5467
Port 0: Range: 44.7 mm Amp: 6700
Port 0: Range: 19.4 mm Amp: 6502
Port 0: Range: 50.5 mm Amp: 4692
Port 0: Range: 40.8 mm Amp: 4368
Port 0: Range: 43.2 mm Amp: 4299
Port 0: Range: 56.3 mm Amp: 5055
Port 0: Range: 46.6 mm Amp: 5467
Port 0: Range: 46.6 mm Amp: 5466
Port 0: Range: 44.6 mm Amp: 7031
Port 0: Range: 44.6 mm Amp: 7031
Port 0: Range: 46.6 mm Amp: 5467
Port 0: Range: 38.8 mm Amp: 4854
Port 0: Range: 19.4 mm Amp: 10339
Port 0: Range: 42.7 mm Amp: 6033
Port 0: Range: 42.6 mm Amp: 8265
Port 0: Range: 84.6 mm Amp: 38117
Port 0: Range: 21.3 mm Amp: 4858
Port 0: Range: 84.4 mm Amp: 38439
Port 0: Range: 44.6 mm Amp: 4517
Port 0: Range: 43.2 mm Amp: 4298
Port 0: Range: 45.1 mm Amp: 4298
Port 0: Range: 84.7 mm Amp: 38555
Port 0: Range: 19.4 mm Amp: 7022
Port 0: Range: 19.4 mm Amp: 5316
Port 0: Range: 45.0 mm Amp: 8124
Port 0: Range: 19.4 mm Amp: 9901
Port 0: Range: 21.3 mm Amp: 10248

Also other firwares present in SmartSonic_HelloChirp_v1_11_0 were tested, none of them privides relevant results.
For verification purposes DK-CH101 SmartSonic platform was bought and tested, with pretty much the same result. Any hints? Is it possible to use CH101 for any distance measuring at all?

Thank you.

phpbb Post ID
38849

sergeycapteco

5 years 1 month ago

Having the same issue with CH201, wrote to tech support, lets see if we can have some reply!

phpbb Post ID
38852

18817673117163com

5 years ago

Hey michltriopscz,

Have you solved the problem?I would appreciate it if you could provide some information.

Best regards,
Victor

phpbb Post ID
38880

philippdengler…

5 years ago

The answer is quite simple. It doesn't work. At least with a reasonable effort.

I soldered my own board with the CH101 and ported to a stm32f-series mcu. It delivered strange results. Due to the CH101-MOD (180 degree FOV) beeing in stock in the meantime I ordered to to verify my boards or the soldering process weren't faulty. I even made an adapter board with the TI SN74 bus driver to ensure I stick as close to the datasheet as possible.

The results are better but far from usable (so my custom horn is definitely part of the problem). In a static scenario (object remains in static for approx one sec) the range measurement jumps from 40 mm to 87 mm straight. If the object is moved the measurement jumps back to 40 mm and so on. I don't see the usecase of such a picky sensor.

By the way: porting was a nightmare. A simple datasheet with register description would have been a huge help.

I simply hope this is a firmware error. The chip itself would have such a wide variety of benefits.

phpbb Post ID
38886

michltriopscz

4 years 12 months ago

Hello and sorry for late reply,

after some more trial and error, I was able to achieve quite good results. It seems firmware needs some time and target movement to detect obstacle to measure distance to. After that, it gives millimeter accuracy with some samples to be complete off range, which I'm simply discarding (target is always within specific range in my scenario). I was however unable measure the distance without moving the target first.

As a side note, providing library and not documentation is indeed a bit unfortunate.

phpbb Post ID
38911
phpbb Topic ID
38705