I am developing an application using a BMX160 and the BSXLite library.
I've read the integration guide was wondering if anybody could clarify the following:
1) Refering to the Table on page 7 of the guide (screen capture below) about the ODR settings, I am assume this is specifying the required configuration settings for each of the 3 sensors. Is that correct?
2) I am really unclear about how often I need to feed the library data via the bsx_dostep call. Do I need to feed it at the ODR rate? That is, should I be calling this function at a rate of 100Hz to supply it the accelerometer and gyroscopic sensor?
3) Table 4 on page 14 shows a list of support data rates (screen capture below). What does Output data rate actually mean in this context?
4) Section 4 states "...The core & controllers should have sufficient resources (ROM/RAM) for library processing" but doesn't specify what they are. In particular, is there any indication what the stack requirements are?
5) This has been asked before, but I can't seem to find an answer. For the arrays of values that are passed in via the bsx_init function, what do they mean? Does the BMX160 configuration need to match these values in some way?
Thanks for any help.
Solved! Go to Solution.
Thanks for your inquiry.
(1) Yes, that is correct. BSXLite library supports ODRs for accel 50Hz, mag 20Hz and gyro 50Hz. So you need to configure BMX160 to match these ODRs.
(2) There are two ways to call bsx_dostep function. One is enable BMX160 gyro data ready interrupt and map it to INT1 pin for example. Once your MCU receives the interrupt signal you can call bsx_dostep function. The other way is use your MCU timer interrupt. Every 20ms (50Hz) your MCU timer will generate an interrupt so that you can call bsx_dostep there. Because the ODR data ready interrupt has tolerance from sensor to sensor, MCU timer may be considered.
(3) Output data rate (ODR) means the sensor internal sampling rate. BMX160 accel and gyro (IMU) inertial measurement unit are internally synchronized. At 50Hz ODR both accel and gyro will automatically update their data registers every 20ms. Mag is an I2C slave to the IMU inside BMX160. The IMU will configure the mag to work at 20Hz and then read and put mag data in BMX160 data registers. So if your MCU calls bsx_dostep function at 50Hz, then it will require sensor data first through I2C or SPI interface and then calculate the sensor fusion results such as quaternions, Euler angles, gravity vector and linear acceleration. Your MCU then will wait for the next timer interrupt to call bsx_dostep again.
(4) Because BSXLite library needs to do sensors' calibrations and sensor fusion algorithms on the background, it requires your MCU to have sufficient RAM and ROM to hold the intermediate results and code size when compiling.
(5) The arrays of values that are passed in via the bsx_init function include sensor sensitivities, axis remapping 3x3 matrix, soft-iron 3x3 matrix, etc. If the BMX160 on your PCB is soldered and aligned to your product body axes in different ways, then you can change the axis remapping 3x3 matrix in the array.
Firstly, thanks for your response. Some additional questions below.
1) There are two tables in the document that refer to the ODR. The one of page 7,states an accelerometer ODR of 100Hz and the one on page 14 (captioned Table 4) says 50Hz.
For the mag, an ODR of 20Hz cannot be configured, only 25Hz. Is that acceptable?
2) OK, thanks for answer.
3) In the sample code the bmf055(file attached), see bmf055.cm bsx_lite_raw_feed() function call , it looks like the data is being fed in at a rate of 100Hz, not 50Hz.
4) Understood. My specific question (Sorry, I was probably not clear) is about the stack usage, as there is no indication in the document as to what is required.
5) OK, but, again, there is no description as to what each value does. When you say "... you can change the axis remapping 3x3 matrix in the array.", which elements in the array need to be changed? And how?
Thanks for your patience.
The sensor ODR for BSXLite should be as shown below.
And it has been confirmed working. About the "table4 - 50hz, 20hz, 50hz", it might be a typo in BSXLite.
No stack information is collected in BSXLite. Sorry that BSXLite doesn't have axis remapping feature included. This means that you have to do the axis remapping on your firmware side and then feed the sensor data after remapping into BSXLite.