A121 Integration using STM32CubeIDE
4
HAL Integration File
4.1
Selecting the Appropriate HAL-integration File
First off you need to pick what HAL integration file to use. The functions in the HAL integration file act as glue between
the RSS radar stack and the drivers generated by the device configuration tool (STM32CubeMX perspective). Your
hardware setup determines which HAL integration file to select as a starting point.
The files “acc_hal_integration_stm32cube_xe121_<single/multi>_sensor.c“ are HAL integrations prepared by Acconeer
to handle the XE121 EVK board together with an STM32 processor.
The file “acc_hal_integration_stm32cube_xe121_single_sensor.c“ will only handle the onboard sensor on the XE121. The
file “acc_hal_integration_stm32cube_xe121_multi_sensor.c“ will handle the onboard sensor on the XE121 aswell as the
possiblity to use XS121 sensors connected in slot S2, S3, S4, S5..
4.2
A121_SPI_HANDLE
Define "A121_SPI_HANDLE" as hspi1 between the comments “USER CODE BEGIN Private defines” and “USER
CODE END Private defines” in the file “Core/Inc/main.h”.
/* USER CODE BEGIN Private defines */
# define A121_SPI_HANDLE hspi1
/* USER CODE END Private defines */
4.3
Sensor Crystal Frequency
The ACC_BOARD_REF_FREQ define assumes 24MHz crystal on the XE121. This value needs to be changed if a crystal
with a different frequency is used with the A121 radar sensor.
© 2022 by Acconeer AB - All rights reserved
Page 18 of 23