
1.2 Software overview
The AEK-SNS-2TOFM1 board contains a preloaded demonstration firmware. It is ready to be tested.
If you have modified the flash memory code and you want to reinstall the original version, use the SPC5-UDESTK
programmer plugged on the JTAG connector. The source code is included in AutoDevKit 1.6.1 (or higher). Among
other demos, you can find one called “SPC582Bxx_RLA AEK_SNS_2TOFM1_1M_with_CAN_for_footdetection-
Trunk System Control”.
For the detailed upload procedure, refer to Section 3.7
The above-mentioned demo purpose is to detect a specific foot/hand gesture and to inform a domain controller
via a CAN message that the successful detection event has occurred.
The gesture consists in a foot/hand movement from the left to the right and vice versa.
Figure 4. Gesture recognition pattern
The recognition process starts when the gesture crosses at least one of the photon beams emitted by the two ToF
sensors.
The algorithm implemented requires that the gesture has to be performed in one second maximum. If the gesture
is not detected, wait one second before repeating it. When the correct movement is detected, the two on-board
LEDs blink three times.
To work correctly, the demo requires the board to be placed at 132 mm height. Otherwise, the two sensors are
not properly configured during the power-up calibration phase. As soon as the board is turned on, and the system
is correctly initialized, the two on-board LEDs turn on. The two sensors detect the movement of the foot/hand for
distances between 0 and 120 mm. The demo can also receive external CAN messages to turn the ToF sensors
on/off. The detected_foot() is used to implement the gesture algorithm.
When performing the tests outdoor, ensure placing the AEK-SNS-2TOFM1 board as shown in the following figure,
to make the sensor photon beams fall within the car shadow cone.
Figure 5. Board placement
UM3006
Software overview
UM3006 - Rev 1 page 3/38