AnsweredAssumed Answered

MEMS Sensors Eval Board - Software causes RPi bcm2835_init: bsc0 mmap failure?

Question asked by Stuart Jobbins on May 26, 2014
Latest reply on Jun 1, 2014 by Bruno Berger

Anyone been using the MEMS Sensor Eval Board from Xtrinsic (specifically the MMA8491Q 3-axis accelerometer) with a RPi using the supplied python scripts or derivatives?

 

After a period (of about 1600 read iterations) it appears to cause a constant series of failures which look like memory allocation failures in the virtual memory mapper of the bcm2835 starting with the BCS0 (used for I2C) and then immediately thereafter the ST (System Timer) and for all subsequent (accelerometer read) function calls (both with an error string that implies bcm2835_init is doing the call to mmap).

 

I'm not sure why the bcm2835_init: would be repeatedly called (as this seems to be the case) when using the read function which forms part of the getAccelerometer function, but there doesn't appear to be any source around for the sensor.so library object which is the interface in the python examples.

 

Is this an expected quirk of the evaluation source...  as I wish to create a prototype 'acceleration logger' to ensure accelerometer sensing will be a suitable product response for a marine application, so need to be able to log at least a days worth of relatively high-speed data acquisition (all 3-axes every 20ms or better, for a whole day)... or do I need to rewrite the interface to the RPi myself just to prove the capability of the sensor for my application?

 

I can't believe the problem is in the (very widely used since 2011) bcm2835 driver from Mike McCauley, so have to presume the sensor.so library object is repeatedly attempting to re-initialise the hardware every time I read the accelerometer... and causes a memory leak.

 

I haven't tried the other sensors on the board, but presume the constructs would be the same and get a similar answer.

 

Any help would be welcome, as the prototype goes in front of the customer as part of system requirement gathering next week!

 

Thanks,

Stuart

Outcomes