-
'The goal is to do the data collection at 833 Hz for hours'
Would you point to a page within the datasheet, that suggests using that frequency or range of frequencies for your use. When I read over, my interpretation of how to request data was a bit different.
How are the gyro, or accelerometer used? It might be that your requirement is different than I envision.
Are you picking up the device from a stationary position and expecting the Espruino device to respond to that input?
p. 35 of datasheet
Are we in 'continuous' mode?Is so, the FIFO buffer is probably filling up before each data item is removed from the buffer and the device is cramming in bytes until errors in output are seen. Could this be a possibility?
How often do you actually need the data, the device outputs? It seems that it is desired in the msec range, but my interpretation is that reading those values should be in the many tens of msec range, say every half second or so.
-
I just tried setInterval(extraction,150);
but it is only outputting one correct data set this time.8539 -645 -18294 -256 126 4104 -668 4262111 0.02233409881 11 15 15 229 225 227 -669 3328 0.02214241027 11 11 19 229 227 223 -653 4864 0.02214145660
Oh sorry, on page 57/114 FIFO ODR can be 833Hz frequency range from 12.5 to 6.6kHz. so we choose 833Hz because it is a nice frequency for the algorithm that we are developing for processing the data
-
I will integrate the gyro over that time period, so I think I will every single set of data that output at 833Hz,
then I will use UART to pass the integrated data and accelerometer to the data handling unit."Is so, the FIFO buffer is probably filling up before each data item is removed from the buffer and the device is cramming in bytes until errors in output are seen. Could this be a possibility?"
I think this is possible. but if this is true, wouldn't it make it very hard to pull the data in high frequency?
Haha have a good time
Hi Robin,
Thank you for helping me so much
Sorry if I misunderstand, I am not so sure how to measure the repeated part if you mean measure how fast the interval is running.
I put the measure time in the all read_FIFO, read_Normal, and read_Time and this is my output
and the code looks like this
ss
I believe the time I measure is in millisecond, and I also measure the clock frequency of the SPI is running correctly at 10 MHz, so I think both system and SPI should techninilly running fast enough? and thank you again : )
yes, that is the IMU datasheet.
I configured FIFO as continuous mode so I can keep the data from the IMU with a set timestamp and it can keep running for hours.
The goal is to do the data collection at 833 Hz for hours and the output timestamps gap should be fixed (increment by 48 or 49 each timestamp). The FIFO mode provides the correct data but I have to reset every time to get the new set of data since it will stop filling after it full. The reset process result in missing some data, so it is not very ideal
Attached is the SPI clock frequency measured from the oscilloscope