FLIR ADK
Getting Sta rt e d
The information contained herein does not contain technology as
defined by EAR,15 CFR772, is publicly available, and therefore
not subject to EAR.
17
the Boson will accept, and the rawBoson tool can packetize the message properly with a CRC
code and start and stop flag. Documentation on how the CRC code and complete bytes need
to be created and formatted will be provided at request. We recommend using this tool to
determine the corresponding byte array to send for a desired command.
UART TX and RX FIFO are both 128 bytes, so large packets (like chunks of a camera firmware
update) can overflow the FIFO if chunk size is not limited to ~64 bytes (in case the FIFO is
not cleared between two successive large messages). Most if not all SDK UART commands
do not exceed 64 bytes so this isn’t a problem in practice except for file transfer. Note it’s
possible to update the camera firmware over GMSL, it will just take a while to send all the
data over to the Boson.
Below is an example of turning the window heater on and off. Note that since the transmitter
on the I2C to UART transceiver is not turned off these commands are written directly to the
boson.
Turn Heater OFF – the heater is off by default
Set GPIO state register on ADK side to configure heater off
write val 0x01 to reg 0x19 to device reg 0xD8
Configure heater GPIO as an OUTPUT (step can be skipped if already done this power cycle)
write val 0x0F to reg 0x18 to device reg 0xD8
Turn Heater ON
Set GPIO state register on ADK side to configure heater on
write val 0x09 to reg 0x19 of device reg 0xD8
Configure heater GPIO as an OUTPUT
write val 0x0F to reg 0x18 of device reg 0xD8
4.6 Sample I2C Functions for Teensy SOC
Below are sample functions for i2cwrite and i2cread as well as a function to send an array
of bytes.
I2C Read and Write:
void i2cwrite(byte addy, byte reg, byte val)
{
byte err;
Wire.beginTransmission(addy);
Wire.write(reg);
Wire.write(val);
err = Wire.endTransmission();
if (err != 0) {
I2Cerror = 1;
}