09-28-2021 11:11 AM
Hello,
we are using BMA456, connected to a uC via SPI Interface.
In first step, I simply want to read the acceleration data registers, and I wrote a small program according to the steps described in "Example 2" of the data sheet.
But the readout of the registers is always Zero.
What am I doing wrong, resp. what do I have to do to make it work ? Is there any further initialisation/configuration necessary ? If so, does anybody have a code example for this ?
I downloaded the driver API, but there is a lot of code inside which I do not (yet) understand.
I searched the net carefully, but could not find any help or information....
Thanks in advance, bye
Harald
Solved! Go to Solution.
09-28-2021 03:36 PM
Hello HBUDE,
In this example code, it demos how to read the acceleration data.
https://github.com/BoschSensortec/BMA456-Sensor-API/blob/master/examples/bma456/generic/acceleromete...
09-29-2021 08:11 AM
Hi BSTRobin,
thanks for your quick answer and for providing the application code example.
But I think there are functions inside which require additional C modules. In the Github folder .../examples/generic/.. I can see more C modules and Header files. Which of them are necessary to be included ?
Sorry, I can surely search for this, but if you can provide this information, it will surely reduce my effort...
However, I will try to adapt the code to my target and hope I will make it work. If not, I will surely get back here 🙂
Thanks in advance, bye bye
Harald
09-29-2021 09:06 AM
Hello HBUDE,
In https://github.com/BoschSensortec/BMA456-Sensor-API/blob/master/examples/bma456/generic/bma4_common...., you could see some empty function in this file. BMA456 driver code was portable, you should implement these host platform related functions, then it will work on your platform.
09-29-2021 09:23 AM