A121 radar sensor nightmare - Page 1
Forum section: electronics / projects

author: calvingloster
author_rank: Regular Contributor
timestamp: July 17, 2025, 09:13:42 am
content: Hi AllIm pretty sure the problem is me. And i hope someone can help me understand. This sensor:https://developer.acconeer.com/download/a121-datasheet/apparently cannot be controlled out of the box like most i2c or SPI sensors. Fair enough. Acconeer provides and API for using this sensor. The information of how to actually get this sensor running is really convoluted and everything is hiding behind link after link after link after link and eventually the last link is a link to the first link. I find it quite comical how my mind has developed to not make sense of how these things are layed out. To me its absolutely ridiculous but ill admit i think the problem sits with me.I found and downloaded the API which is a whole bunch of .c .h and .a files that include recompiled libraries to run the sensor and functions to do all the tasks you need. What i dont understand and what i cant find is the firmware that needs to be uploaded to the radar sensor on startup. Apparently it needs firmware about 90kB loaded into ins ram on every power cycle. Where is this firmware though? i cant find it on the website to save my life. And how does this firmware get loaded onto the sensor using a microncontroller other than the one they use on the eval board as i will be using the radar on its own with a sam4s micro. Any help will much be appreciated.

author: tszaboo
author_rank: Super Contributor
timestamp: July 17, 2025, 10:21:07 am
content: If you write Acconeer on their helpdesk, they are usually quite helpful at making your code work.

author: BadeBhaiya
author_rank: Regular Contributor
timestamp: July 17, 2025, 12:00:37 pm
content: I worked on a product which used A121. While not directly involved with making it work, I recall it was fairly straightforward as long as you downloaded their XM122 development kit source files and edited them to suit your needs.1. Copy all the .h (header), *.c (source), and *.a (compiled code) into your project.2. Add the source files to your building system, link against the *.a files.3. Map the various callbacks to your code. Only the SPI read/write and GPIO toggling callbacks should be enough, no need to implement all the POSIX ones like malloc etc (you have to do this in acc_hal_integration_single_thread_xm122.c)4. You will find examples in the code they give. Edit the examples with the correct thresholds/parameters to your application.5. Compile the code, if everything is well, it should start spitting out . Also try turning out logging for their stack using the given "acc_wrap_printf.c" file.Protip: Increase your stack size in the linker script/build system. Measurements take a lot of stack memory.Now if you're using Zephyr RTOS, its a tad bit more painful with all the devicetree stuff, but still doable. Software seems to be getting more annoying to work with every single day

author: calvingloster
author_rank: Regular Contributor
timestamp: July 17, 2025, 12:14:43 pm
content: Thanks for the reply much appreciated. By what you describe above then I assume there is no binary or hex file that needs to be uploaded to the sensor everytime it powers up? From what you describe seems relatively simple, I'll give it a try when I get home and reach out if I get stuck again.