on 2024-05-13 08:00 AM
This knowledge article explains how you can augment your automotive safety applications, relying on the new automotive IMU ASM330LHB.
The ASM330LHB is a 3-axis digital accelerometer and 3-axis digital gyroscope module that is suited for automotive systems with safety standards up to ASIL B. It is used for redundancy (as two modules) for safety-compliant applications and comes with a dedicated free-of-charge software library called ASILB-LIBRARY.
The IMU ASM330LHB is an automotive-qualified MEMS inertial-sensing module which addresses functional-safety applications up to ASIL B if it is used in redundancy with the software library ASILB-LIBRARY.
This solution is used to target ASIL B applications that need information about the linear accelerations and angular rates of the vehicle. Use cases can range from in-dash car navigation, precise positioning, V2X (vehicle-to-everything), radar, lidar, and camera stabilization systems or others.
An application example is shown in the picture below, which describes a precise positioning module where IMU sensors are used together with GNSS receiver and antenna protection.
Figure 1: Application example where a precise positioning module based on ASM330LHB is used.
In this scenario, ASM330LHB is the candidate as a 6-axis IMU because of its high-accuracy inertial measurements. In fact, it can improve the precise positioning of the car in context if it is used in redundancy with the software library ASILB-LIBRARY.
The ASIL B software library has been certified independently by TÜV SÜD in accordance with the automotive functional-safety standard ISO26262. Furthermore, it implements software mechanisms focused on data integrity and data accuracy.
The ASILB-LIBRARY is compliant with MISRA C guidelines and it implements robust software safety mechanisms detailed in the safety manual AN5691. The library has a low memory footprint, and it is platform independent. The implementation of write, read, SysTick, and delay functions are delegated to the user via function pointers.
Figure 2: ST offers a solution based on two identical ASM330LHB inertial measurement units (IMU 1 and IMU 2) as well as the ASILB-LIBRARY software library, called "Sensing module" and "Safety Engine", respectively, for applications up to ASIL B.
Interfacing the sensing module composed of two ASM330LHB IMUs involves the following phases:
Each library API returns an error code.
Figure 3: Design concept of ASM330LHBxx_ASILB_library.
Here is a demo based on ASM330LHBxx_ASILB_library in the Unico-GUI for the ASM330LHB, using DIL24 STEVAL-MKI236A connected to the STEVAL-MKI109V3 motherboard.
After launching the Unico-GUI software, choose the STEVAL-MKI236A board with ASM330LHBxx_ASIL_B support, and click on the [Select Device] button. Once the device is selected, the main window appears in a few seconds. The current firmware implementation communicates with the sensor using the SPI communication protocol.
Figure 4: Unico launcher.
Figure 5: Unico main window.
The integration provided consists by the following tools:
Figure 7: Data tool.
The main window exposes the following tabs:
The Options tab allows the user to initialize ab_struct and set selected parameters on the device once the [Initialize library] button is clicked. The mentioned button requests ab_init and ab_chck command execution. All parameters are set in the ab_struct including the read-only “device” parameter, which cannot be edited by the user since it is hardcoded according to the device selected.
Once the [Initialize library] button is clicked, if the ab_init error code is null, the [Start] button is enabled and the sensor data stream can be requested.
Error code box, box 2 in Figure 8, lists:
Figure 8: [Options] tab.
Unico button command |
ASM330LHBxx_ASILB_library |
[Start] |
ab_start |
[Stop] |
ab_stop |
[Initialize library] |
ab_init + ab_chck |
The tuning box exposes tuning parameters retrieved on stop requested by clicking the [Get Tuning Data] button (button 3 in Figure 8). This button cannot be clicked if the [Start] button was never clicked.
The runtime box in the options tab contains steady flag control to set a steady flag parameter on the device while sensors are streaming data. The steady flag should be enabled when the device is in a steady condition, and it enables dedicated checks during the ab_process instructions execution. When the control value is changed, the *ab_stdy command is sent to the library with a value to set.
The save tab allows the user to save a stream of sensor output data including error code on a dedicated log file selected by clicking the [Browse…] button, the user can select data to store. Once the destination file path is selected, the [Start] and [Stop] buttons define the acquisition period.
Figure 9: [Save] tab.
More details are available in the user manual UM3134.
ASM330LHB, used in redundancy (as two modules) and in combination with a dedicated software library, has been evaluated as compatible to be adopted in ASIL B automotive applications. This solution is described in detail in the safety manual AN5691.
For further details on the ASM330LHB and its ASIL B software library, you can refer to: