background image

A121 Integration using STM32CubeIDE

Figure 8: SPI Setup

USER_LABEL

NUCLEO PIN

SPI1_MOSI

PA7

SPI1_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 XE121 and the NUCLEO-board can be connected:

© 2022 by Acconeer AB - All rights reserved

Page 9 of 23

Содержание A121

Страница 1: ...A121 Integration using STM32CubeIDE User Guide...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 14: ...A121 Integration using STM32CubeIDE Figure 12 Generate code 2022 by Acconeer AB All rights reserved Page 13 of 23...

Страница 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...

Страница 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...

Страница 17: ...A121 Integration using STM32CubeIDE Figure 14 PuTTY Session 2022 by Acconeer AB All rights reserved Page 16 of 23...

Страница 18: ...A121 Integration using STM32CubeIDE Figure 15 PuTTY Configuration 2022 by Acconeer AB All rights reserved Page 17 of 23...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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_...

Страница 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...

Отзывы: