33## Description
44
55This file describes the installation of the tmf8829 linux reference driver, and how to use it.
6+ There is also a description for using python files contained in the tmf8829_zeromq_server_linux folder.
7+
8+ Information regarding the TMF8829 time of flight device can be found at:
9+ https://ams-osram.com/products/sensor-solutions/direct-time-of-flight-sensors-dtof/ams-tmf8829-48x32-multi-zone-time-of-flight-sensor
610
711### Compilation
812
913The compilation was done with the ams-Osram provided image bookworm_4v0.
1014Linux version 6.1.73-ams #1 Mon Apr 22 19:32:02 BST 2024 2024 armv6l
1115
16+ The reference driver could be build as I2C or SPI driver.
17+ See EXTRA_CFLAGS in Kbuild.
18+ For I2C use: EXTRA_CFLAGS += -DUSE_I2C
19+ For SPI use: EXTRA_CFLAGS += -DUSE_SPI
20+
21+ For compilation on the bookworm image use the command:
22+ - make CONFIG_SENSORS_TMF8829=m
23+
24+ For compilation on an other image it is required to adapt the linux source path.
25+ The linux sources could be found in the folder "/usr/src".
26+ The LINUX_SRC path in the file Makefile must be adapted, or the LINUX_SRC path must be specified in the command.
27+
28+ Examples:
29+ - make CONFIG_SENSORS_TMF8829=m LINUX_SRC=/usr/src/linux-$(uname -r)
30+ - make CONFIG_SENSORS_TMF8829=m LINUX_SRC=/usr/src/linux-headers-$(uname -r)
31+ - make CONFIG_SENSORS_TMF8829=m LINUX_SRC=/usr/src/linux-6.1.73-ams
32+
33+ ### Linux Driver Sources
34+
35+ The Linux Driver Sources could be found on GITHUB:
36+
37+ - https://github.com/ams-OSRAM/tmf8829_driver_linux
38+
39+ with
40+
41+ - git clone https://github.com/ams-OSRAM/tmf8829_driver_linux.git
42+
43+ or from the TMF8829 product site.
44+
1245## Files
1346
14- Overlay Files
47+ Overlay Files < br >
1548The device tree overlay files for the tmf8829 prototyped on the Raspberry Pi zero.
49+ <br >
1650 - tmf8829-overlay-fpc.dts
1751 evm configuration with flex printed circuit, EN gpio and INT gpio, I2C
52+ <br >
1853 - tmf8829-overlay-fpc-polled.dts
1954 evm configuration with flex printed circuit, EN gpio and INT register polled, I2C
55+ <br >
2056 - tmf8829-overlay-fpc-spi.dts
2157 evm configuration with flex printed circuit, EN gpio and INT gpio, SPI
58+ <br >
2259 - tmf8829-overlay-fpc-spi-polled.dts
2360 evm configuration with flex printed circuit, EN gpio and INT register polled, SPI
2461
2562Module File
26- - tmf8829.ko
63+ - tmf8829.ko for SPI
64+ - tmf8829.ko for I2C
2765
2866ams Raspberry USB Sensorbridge
2967 - ams-usb-sensorbridge.service
@@ -66,6 +104,7 @@ Configuration of Raspberry Pi zero:
66104 - tmf8829-overlay-fpc-spi.dtbo for spi communication
67105 - tmf8829-overlay-fpc-polled.dtbo for i2c communication and int register polling
68106 - tmf8829-overlay-fpc-spi-polled.dtbo for spi communication and int register polling
107+ - tmf8829-overlay-fpc-spi-polled-fusion.dts special overlay file
69108
70109 - Hex File ( if required )
71110
@@ -91,14 +130,18 @@ Configuration of Raspberry Pi zero:
91130 <br >or
92131 - ./tmf8829_install_spi_polled_int.sh
93132
94- 7 . Optional:<br > If the python zmq server sources will be installed
133+ 7 . for I2C driver:
134+ - open /boot/firmware/config.txt
135+ uncomment line dtoverlay=gpio-ir-tx,gpio_pin=25
136+
137+ 8 . Optional:<br > If the python zmq server sources will be installed
95138 and the server should be started at boot time, enable the zmq service.
96139
97140 - systemctl enable tmf8829_zmq_server.service
98141
99- 8 . sync
142+ 9 . sync
100143
101- 9 . reboot (reboot system)
144+ 10 . reboot (reboot system)
102145
103146## General commands on the Raspberry Pi
104147
@@ -143,11 +186,7 @@ Configuration of Raspberry Pi zero:
143186
144187 - ps -ef
145188
146- 8 . Makefile command for TMF8829
147-
148- - make CONFIG_SENSORS_TMF8829=m
149-
150- 9 . The overlay file could be changed
189+ 8 . The overlay file could be changed
151190
152191 - copy overlay file to boot directory
153192
@@ -167,24 +206,25 @@ Configuration of Raspberry Pi zero:
167206
168207 - echo "dtoverlay=tmf8829-overlay" >> /boot/firmware/config.txt
169208
170- 10 . Change and see log level
209+ 9 . Change and see log level
171210
172211 - echo <level > > /proc/sys/kernel/printk
173212 - cat /proc/sys/kernel/printk
174213
175- 11 . See temperature and cpu frequency
214+ 10 . See temperature and cpu frequency
176215
177216 - vcgencmd measure_temp
178217 - vcgencmd measure_clock arm
179218
180- 12 . Change raspberry configuration
219+ 11 . Change raspberry configuration
181220
182221 - sudo raspi-config
183222
184- 13 . see the running services
223+ 12 . see the running services
185224
186225 - systemctl
187- 14 . start / stop the running tmf8829 zmq service
226+
227+ 13 . start / stop the running tmf8829 zmq service
188228
189229 - systemctl start tmf8829_zmq_server.service
190230 - systemctl stop tmf8829_zmq_server.service
@@ -202,7 +242,9 @@ https://www.raspberrypi.com/documentation/computers/raspberry-pi.html
202242
203243## System File System
204244
205- - I2C Bus 0 (fpc): /sys/class/i2c-adapter/i2c-0/0-0041/
245+ File System location:
246+ - I2C Driver: I2C Bus 0 (fpc): /sys/class/i2c-adapter/i2c-0/0-0041/
247+ - SPI Driver: SPI Dev 0: /sys/class/spi_master/spi0/spi0.0/
206248
207249### Common Attributes (tmf8829_common)
208250
@@ -366,7 +408,7 @@ Attributes:
366408 - FrameID:
367409 - TMF8829_COM_RESULT__ measurement_res_frame 0xAA /** < measurement result frame * /
368410 - TMF8829_COM_RESULT__ measurement_hist_frame 0xBB /** < measurement histogram frame * /
369- - TMF8829_COM_RESULT__ measurement_header 0xFD /** < measurement frame header only; for debug only should never occur in result frame * /
411+ - TMF8829_COM_RESULT__ measurement_header 0xFD /** < measurement frame header only; for debug only should never occur in result frame * /
370412 - TMF8829_COM_RESULT__ error_frame 0xFE /** < error frame * /
371413 - TMF8829_COM_RESULT__ no_frame 0xFF /** < no frame / unhandled interrupt * /
372414 - The clock correction factor is only available for result frames in Q1.15 numbering format.
@@ -439,7 +481,7 @@ The logger description README.md in the folder /home/ams/tmf8829_zeromq_server_l
439481 python ./tmf8829_zeromq_client.py
440482 ```
441483
442-
443484### GUI
444485
445486The TMF8829 EVM GUI could be used to see the results on a pc.
487+ This software could be downloaded from the product site. See section "Software".
0 commit comments