Reading ADXL355 via SPI with the nrf52840

Hello,

I want to read the data from an accelerometer ADXL355. I tried to follow a little bit the process of how is being done in the lesson 5 exercise 1 of the nRF intermediate course.

For now, I just wanted to develop the read_reg and write_reg functions, without stopping into the compensation or calibration. Is this even possible? Or I need to implement these other functions in order to be able to read the data?

I also saw that there are some questions regarding other accelerometers and that in previous versions of the SDK, there were some samples that showed how to read data from the accelerometer, but this is without SPI, and not with NRF Connect SDK, so I got a little bit confused.


I thought that for implementing the SPI of the ADXL355 in the overlay file, I would only have to change the &spi1 to:

adxl355: accelerometer@0 { 
    compatible = "adi,adxl355"; 
    reg = <0>;
    spi-max-frequency = <1000000>;
};

But I think maybe the ADXL355 is not included in the list of devices supported. I saw that the Linux kernel is available, but honestly, I don't know how to include it in my project.
I would appreciate the help.

Thank you!

Related