Hi Team,
I could not able to find any SPI driver for BMA400 sensor so let me know if there is any other way around.
I am trying to connect nrf52840 with BMA400 on SPI1 port.
Regards,
Aman
Hi Team,
I could not able to find any SPI driver for BMA400 sensor so let me know if there is any other way around.
I am trying to connect nrf52840 with BMA400 on SPI1 port.
Regards,
Aman
Hi Aman,
Unfortunately, there is no driver for the BMA400 driver in the SDK. There was a PR for it here: https://github.com/zephyrproject-rtos/zephyr/pull/52193, but it was never completed. You may use this driver as a starting point if you want to create an SDK driver. Alternatively, you can use the Zephyr SPI api from your application. Here's an example of how you can use the API https://github.com/too1/ncs-spi-master-slave-example
Best regards,
Vidar
Hi Vidar,
Thank you for your response.
Above PR they only have I2C driver and I have also checked zephyr os main thread which contains BMA4XX drivers but they also not included SPI ones.
If my sensor don't have driver for SPI then how could i use the Zephyr platform SPI api to fetch the details?
I would like to write my own drivers if you help me out for the same.
Thanks and regards,
Aman
Hi,
Sorry, I assumed the driver had not been added since it was not mentioned in the linked PR nor or included in NCS v2.6.0. If you want to add SPI support, I recommend you use one of the other bosch sensors as a reference. For instance, the bme680 spi driver.
Best regards,
Vidar
i have written the SPI drivers for BMA4XX Drivers and getting some runtime errors.
Please check the log above.
The crash log suggests that your application is calling a zero-initialized function pointer. I would recommend you look up the LR register address with 'addr2line' to see if you can find where this call was made.
The crash log suggests that your application is calling a zero-initialized function pointer. I would recommend you look up the LR register address with 'addr2line' to see if you can find where this call was made.