hit counter script

Acconeer A121 User Manual

Integration using stm32cubeide
Hide thumbs Also See for A121:

Advertisement

Quick Links

A121 Integration using STM32CubeIDE
User Guide

Advertisement

Table of Contents
loading

Summary of Contents for Acconeer 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: Table Of Contents

    Adding Acconeer Software ........
  • Page 4: Introduction

    A121 Integration using STM32CubeIDE 1 Introduction In this document there will be a short guide with example on how to generate a project and setup the Acconeer software in STM32CubeIDE. The MCU board used as an example in this guide is a Nucleo-L476RG. We will show how to connect an XE121, including the A121 radar sensor.
  • Page 5: Getting Started With Stm32Cubeide

    A121 Integration using STM32CubeIDE 2 Getting Started with STM32CubeIDE This section will cover how to setup a project in STM32CubeIDE, and make sure that the code works with the Acconeer software. Start STM32CubeIDE and click “Start new STM32 project”. The option is also available under “File STM32Project”.
  • Page 6: Project 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 bottom of the page. © 2022 by Acconeer AB - All rights reserved Page 5 of 23...
  • Page 7: Pin Configuration

    The Pinout is flexible – however it is important that the pins communicating with the radar have the right user labels and that SPI is configured with “Full-Duplex Master”-mode. In order to perform pin configuration you need to have the “.ioc”-file open that is named after your project. © 2022 by Acconeer AB - All rights reserved Page 6 of 23...
  • Page 8 The “B1 [Blue PushButton]“ on the Nucleo board is not used on our examples and can be removed. The pin configuration is removed by doing a left mouse click on PC13 / “B1 [Blue PushButton]“ and then selecting “Reset_State“. © 2022 by Acconeer AB - All rights reserved Page 7 of 23...
  • Page 9 In our example we activate 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 doing this we get the SPI GPIOs: © 2022 by Acconeer AB - All rights reserved Page 8 of 23...
  • Page 10: 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...
  • Page 11: Interrupt Configuration

    The GPIO signals from the processor to the sensor should be setup as outputs with very high drive strength. 1. Select the GPIO item under the System Core. 2. Select the GPIO tab. 3. Configure the GPIO pins accoring to the table below. © 2022 by Acconeer AB - All rights reserved Page 10 of 23...
  • Page 12: Xe121 Sensor Selection

    Figure 10: GPIO Configuration 2.6 XE121 Sensor Selection The XE121 board has support for adding up to 4 extra A121 sensors by using FFC cables and XS121 boards. The selection of which sensor to communicate with is done in the acc_hal_integration_xe121_multi_sensor.c file.
  • Page 13: Spi Configuration

    A121 Integration using STM32CubeIDE 2.8 SPI Configuration To make the SPI interface work properly with the Acconeer software you might need to set the Prescaler (for Baud Rate) and Data Size. Press the SPI you are using and under the Configuration menu you can change parameters. Under “Basic Parameters” you can find that “Data Size”...
  • Page 14 A121 Integration using STM32CubeIDE Figure 12: Generate code © 2022 by Acconeer AB - All rights reserved Page 13 of 23...
  • Page 15: Configuring Project For Acconeer Software

    • integration • rss In the “doc”-folder you can find reference documentation of the Acconeer software. The “examples”-folder contains example programs and their header-files. The “rss”-folder contains two subfolders called “include” and “lib”. The “lib”- folder contains the Radar System Software (RSS) and the “include”-folder contains the header-files needed to use RSS.
  • Page 16: Adding Print Functionality With Uart/Usart

    5. Use the same Speed as used for the UART in the STM32CubeIDE project, default 115200. 6. Select Terminal in the Category window. 7. Tick the Implicit CR in every LF tickbox 8. Clock in Open to start the terminal © 2022 by Acconeer AB - All rights reserved Page 15 of 23...
  • 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: Hal Integration File

    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 20: Running A Radar Sensor Example

    After including the header-file, you can call the function from the "main.c"-file in the user code 2 field by the following call: /* USER CODE BEGIN 2 */ acc_example_service (0 , NULL ) ; /* USER CODE END 2 */ © 2022 by Acconeer AB - All rights reserved Page 19 of 23...
  • Page 21: Troubleshooting And Faq

    Or there is simply not enough memory. Are you using FREERTOS? Make sure that the thread that is handling the Acconeer software has enough stack size to be able to run the software.
  • Page 22: Uart Problems

    A121 Integration using STM32CubeIDE Figure 16: SPI transfer example Note that the A121 enable signal must be set high at least 2 ms before the SPI transfer. Figure 17: A121 Enable Signal 6.4 UART Problems In order to verify the prints over UART we use picocom in Ubuntu: $ picocom -- imap lfcrlf -- baud 115200 / dev / ttyACM0 We also had to make sure, in main.c, that the baudrate and word length is correct:...
  • Page 23 ( heap_end + incr > stack_limit ) errno = ENOMEM ; return ( caddr_t ) -1; heap_end += incr ; return ( caddr_t ) prev_heap_end ; © 2022 by Acconeer AB - All rights reserved Page 22 of 23...
  • Page 24: Disclaimer

    7 Disclaimer The information herein is believed to be correct as of the date issued. Acconeer AB (“Acconeer”) will not be responsible for damages of any nature resulting from the use or reliance upon the information contained herein. Acconeer makes no warranties, expressed or implied, of merchantability or fitness for a particular purpose or course of performance or usage...

Table of Contents