Skip to content

Commit 1063d2a

Browse files
- changes for 10m mode release
1 parent a0c053a commit 1063d2a

File tree

14 files changed

+759
-1513
lines changed

14 files changed

+759
-1513
lines changed

LICENSE

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
/*
2-
*****************************************************************************
3-
* Copyright by ams OSRAM AG *
4-
* All rights are reserved. *
5-
* *
6-
* IMPORTANT - PLEASE READ CAREFULLY BEFORE COPYING, INSTALLING OR USING *
7-
* THE SOFTWARE. *
8-
* *
9-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
10-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *
11-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS *
12-
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT *
13-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, *
14-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
15-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, *
16-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY *
17-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
18-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE *
19-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
20-
*****************************************************************************
21-
*/
1+
Copyright 2024 ams-OSRAM AG
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the “Software”), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7+
of the Software, and to permit persons to whom the Software is furnished to do
8+
so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ UART commands (single character)
4747
- i ... I2C address change
4848
- m ... start measure
4949
- p ... power down
50+
- r ... remote control mode
5051
- s ... stop measure
5152
- t ... switch persistence and thresholds
5253
- w ... wakeup
@@ -113,9 +114,35 @@ The simplest way is to do a live factory calibration. I.e. do the following step
113114
6. Enter the following commands in your terminal console:
114115
- e
115116
- f
116-
7. The application reports the calibration data: e.g. #Cal,2,0,0,A,B0,BE,BD,7C,F5,F0,F3,F7,7,4
117+
7. The application reports the calibration data: e.g. #Cal,0x2,0x0,0x0,0xA,0xB0,0xBE,0xBD,0x7C,0xF5,0xF0,0xF3,0xF7,0x7,0x4
117118
8. If the application does not send the calibration data the calibration has failed. Check your cover glass and check if there is no object (within 40cm) in the field-of-view of the sensor.
118119

120+
To use the obtained factory calibration data as default add this code to the sketch:
121+
122+
```
123+
static const uint8_t deviceFactoryCalibration[sizeof(tmf8806FactoryCalibData)] =
124+
{
125+
0x2,0x0,0x0,0xA,0xB0,0xBE,0xBD,0x7C,0xF5,0xF0,0xF3,0xF7,0x7,0x4
126+
};
127+
128+
void tmf8806Initialise ( tmf8806Driver * driver, uint8_t logLevel )
129+
{
130+
tmf8806ResetClockCorrection( driver );
131+
driver->i2cSlaveAddress = TMF8806_SLAVE_ADDR;
132+
driver->clkCorrectionEnable = 1; // default is on
133+
driver->logLevel = logLevel;
134+
driver->measureConfig = defaultConfig;
135+
// driver->factoryCalib = defaultFactoryCalib;
136+
tmf8806DeserializeFactoryCalibration(deviceFactoryCalibration,&(driver->factoryCalib));
137+
driver->stateData = defaultStateData;
138+
driver->info = tmf8806DriverInfoReset;
139+
driver->device = tmf8806DeviceInfoReset;
140+
}
141+
```
142+
143+
Put the device calibration data into the array **deviceFactoryCalibration** and replace the assignment of the default factory
144+
calibration with a call to deserialize the calibration data from that array.
145+
119146
## Crosstalk readout
120147

121148
The application reports the crosstalk with each measurement result. E.g.:
@@ -167,4 +194,11 @@ Line Tag | Histogram Type
167194
\#PT | proximity
168195
\#TG | distance
169196
\#TGPUC | pileup-corrected distance
170-
\#SUM | summed
197+
\#SUM | summed
198+
199+
## Remote Control Mode
200+
201+
This is a new operation mode for the TMF8806 VCSEL (laser diode) to act as an infrared LED controlled
202+
by the input signal on GPIO1. GPIO1 == LO -> VCSEL OFF, GPIO1 == HI -> VCSEL ON.
203+
This function requires firmware patch 4.14.1.x or newer. It does not work with standard ROM firmware.
204+
To exit the remote control mode send the command "s" (stop measure).
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
srec_cat.exe -o tmf8806_image.c -C-Array tmf8806_image -INClude mainapp_PATCH_Leica_k3.hex -Intel
1+
srec_cat.exe -o tmf8806_image.c -C-Array tmf8806_image -INClude mainapp_PATCH_Maxwell.hex -Intel
2+

0 commit comments

Comments
 (0)