
A121 Integration using STM32CubeIDE
Contents
1 Introduction 3
2 Getting Started with STM32CubeIDE 4
2.1 MCU/BoardSelection ............................................ 4
2.2 ProjectSetup ................................................. 5
2.3 PinConfiguration............................................... 6
2.3.1 PinConfigurationwithXE121.................................... 9
2.4 InterruptConfiguration ............................................ 10
2.5 GPIOConfiguration.............................................. 10
2.6 XE121SensorSelection ........................................... 11
2.7 XE121SingleSensorSetup.......................................... 11
2.8 SPIConfiguration............................................... 12
2.9 CodeGeneration ............................................... 12
3 Configuring Project for Acconeer Software 14
3.1 AddingAcconeerSoftware.......................................... 14
3.1.1 Source-files.............................................. 14
3.1.2 Header-files.............................................. 14
3.1.3 Libraries ............................................... 14
3.2 ProjectSettings ................................................ 14
3.3 Adding Print Functionality with UART/USART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3.1 FindSTM32BoardCOMport.................................... 15
3.3.2 StartandConfigurePuTTY ..................................... 15
4 HAL Integration File 18
4.1 Selecting the Appropriate HAL-integration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2 A121_SPI_HANDLE............................................. 18
4.3 SensorCrystalFrequency........................................... 18
5 Running a Radar Sensor Example 19
6 Troubleshooting and FAQ 20
6.1 ExampleFails................................................. 20
6.1.1 Sensor Creation Returns NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.1.2 ConfigCreationHardfaults...................................... 20
6.2 The Program is Stuck in HAL_Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.3 Troubleshooting SPI Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.4 UARTProblems................................................ 21
6.5 LinkErrors .................................................. 21
6.6 HeapMemoryCorruption........................................... 21
7 Disclaimer 23
© 2022 by Acconeer AB - All rights reserved Page 2 of 23