10-24-2022 11:21 AM
Hi,
I got a BHI260AP on a Shuttle Board 3.0 and an Application board 3.0.
I modified the quaternion.c example to read additional virtual sensors from the board (accel, accel_calib, gyro, gyro_calib, ...). I created several callback functions that push the sensor data to arrays, that I then want to write to *.csv files in the end.
However, as soon as I add >2 virtual sensors with a sampling rate of 200Hz the FIFO starts to overflow. According to this document (https://www.bosch-sensortec.com/media/boschsensortec/downloads/application_notes_1/bst-bhi260ab-an00...) I should have "plenty" of FIFO space available (Figure 3 -> 240KB/2?).
If I calculate the amount of data (let's say 4 virtual sensors, 200Hz each, 3*16bit) I would arrive at 4.8KB / second. That should not exhaust the FIFO right? I tried flushing the FIFO in the main loop, but that made no difference? I also increased WORK_BUFFER_SIZE from 2048 to 8192 but that did not make a difference either.
10-24-2022 03:49 PM
I just built myself a custom firmware with: fifo,1.00
The output tells me that I am getting 17408 bytes of non-wake FIFO. Still I am getting a FIFO overlow not even a second after startup.
[195/196] Generating Bosch_APP30_SHUTTLE_BHI260_aux_BMM150_turbo.elf
Reclaiming .initdata: 1508 bytes
Reclaiming .reclaim: 1200 bytes
Free code ram for FIFO: 0x0013e9b0 to 0x00140000 (5712 bytes)
Free data ram for FIFO: 0x00a13800 to 0x00a18000 (18432 bytes)
Optional RAM bank usage: Code banks=3, Data banks=2
Free ram for FIFO: 19292
Estimated Wake FIFO: 1536
Estimated Non-Wake FIFO: 17408
11-01-2022 08:07 AM
Hi stef87,
You can run program in RAM or Flash and print data through COM port, which will be faster than running program on the PC side. Let the FIFO read as soon as possible each time.
11-01-2022 09:40 AM
Thank you for your response.
Could you please point me to any samples how to do that exactly, e.g. with COINES?
12-14-2022 09:05 AM
Hi stef87,
After you install latest v2.7 COINES software, you could refer document under "C:\COINES\v2.7.0\doc" folder, enter into "C:\COINES\v2.7.0\examples\bhy2\examples\euler" folder and edit your code if you need, compile code and execute program with the command:
mingw32-make LOCATION=RAM TARGET=MCU_APP30 download