background image

A121 Integration using STM32CubeIDE

User Guide

Summary of Contents for A121

Page 1: ...A121 Integration using STM32CubeIDE User Guide...

Page 2: ...A121 Integration using STM32CubeIDE A121 Integration using STM32CubeIDE User Guide Author Acconeer AB Version a121 v0 4 1 Acconeer AB July 6 2022 2022 by Acconeer AB All rights reserved Page 1 of 23...

Page 3: ...files 14 3 1 3 Libraries 14 3 2 Project Settings 14 3 3 Adding Print Functionality with UART USART 15 3 3 1 Find STM32 Board COM port 15 3 3 2 Start and Configure PuTTY 15 4 HAL Integration File 18 4...

Page 4: ...ere is some extra logic on the XE121 board to support multiple sensors that typically is not present on boards with only one sensor To show how a typical single sensor integration can be done we have...

Page 5: ...u can skip this part by selecting No proxy 2 1 MCU Board Selection Search for the MCU or Board you are working with in the MCU Selector Board Selector tab In the example in this document we use the bo...

Page 6: ...Setup Select a name and location for your project and select the following options Target language C Target Binary type Executable Target Project Type STM32Cube Finally press the Finish button at the...

Page 7: ...open the STM32CubeMx perspective Figure 5 Open STM32CubeMX perspective 2 3 Pin Configuration The Pinout is flexible however it is important that the pins communicating with the radar have the right us...

Page 8: ...The pin configuration is removed by doing a left mouse click on PA5 LD2 green Led and then selecting Reset_State Figure 6 Remove LD2 pin The B1 Blue PushButton on the Nucleo board is not used on our...

Page 9: ...e SPI1 with Full Duplex Master mode by going into Connectivity in the Pinout and Configuration tab Then by pressing SPI1 the option of selecting mode is available Full Duplex Master is selected When d...

Page 10: ...I1_MISO PA6 SPI1_SCK PA5 2 3 1 Pin Configuration with XE121 In order to set new GPIOs you can left click the desired pin and selected the desired function of the pin The table below shows how the XE12...

Page 11: ...i sensor SEN_INT4 PB4 GPIO_EXTI4 Only needed for multi sensor SEN_INT5 PC0 GPIO_EXTI0 Only needed for multi sensor 2 4 Interrupt Configuration The NVIC interrupt for the SEN_INT1 SEN_INT2 SEN_INT3 SEN...

Page 12: ...the acc_hal_integration_xe121_multi_sensor c file SPI_SEL2 SPI_SEL1 SPI_SEL0 Sensor Selection LOW LOW LOW Sensor 1 XE121 LOW LOW HIGH Sensor 2 XS121 S2 LOW HIGH LOW Sensor 3 XS121 S3 LOW HIGH HIGH Se...

Page 13: ...o use different prescaler values to fit your project The A121 sensor supports SPI frequencies up to 50 MHz In experimental configurations where the sensor and MCU are not mounted on the same PCB the m...

Page 14: ...A121 Integration using STM32CubeIDE Figure 12 Generate code 2022 by Acconeer AB All rights reserved Page 13 of 23...

Page 15: ...y examples copy them from cortex_m4_gcc examples to Core Src folder Also move the acc_integration_stm32 c and the acc_integration_log c files from the cortex_m4_gcc integration folder to the Core Src...

Page 16: ...PuTTY from https putty org and install it on your computer 3 3 1 Find STM32 Board COM port If using Windows go to Device Manager to locate the COM port used by your STM32 Board Figure 13 Windows Devi...

Page 17: ...A121 Integration using STM32CubeIDE Figure 14 PuTTY Session 2022 by Acconeer AB All rights reserved Page 16 of 23...

Page 18: ...A121 Integration using STM32CubeIDE Figure 15 PuTTY Configuration 2022 by Acconeer AB All rights reserved Page 17 of 23...

Page 19: ...e 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 o...

Page 20: ...header file example_service h in the user code includes field in your main c file in the following manner USER CODE BEGIN Includes include example_service h USER CODE END Includes After including the...

Page 21: ...cconeer software has enough stack size to be able to run the software 6 2 The Program is Stuck in HAL_Delay If the program keeps entering HAL_Delay or seems to be stuck there for longer periods of tim...

Page 22: ...he link order of the libraries Please check that the RSS libraries are listed in order stated in section 3 1 3 Libraries 6 6 Heap Memory Corruption When asking for more heap the sbrk function will inc...

Page 23: ...k min_stack_size static char heap_end char prev_heap_end if heap_end 0 heap_end end prev_heap_end heap_end if heap_end incr stack_limit errno ENOMEM return caddr_t 1 heap_end incr return caddr_t prev_...

Page 24: ...lure to meet such industry standard requirements Unless explicitly stated herein this document Acconeer has not performed any regulatory conformity test It is the user s responsibility to assure that...

Reviews: