I've finally had some time to get back to this. I have the sensors working, but there is some odd behavior I can't get to the bottom off. The sensors are MPU6000, HMC5983, and MS5611. All sensors are on SPI2.
Occasionally, I get a sensors alarm indicating the MPU6000 read did not occur on time. It's not often, but I do see the GCS status box for the sensors change from green to red momentarily.
I can make this go away by commenting out the MS5611. Since the MPU6000 and HMC5983 reads are interrupt controlled and the MS5611 is not, could there be some sort of SPI bus contention going on with the MS5611 reads? If so, is there anything that can be done about it?
Or have I overlooked something else?
One additional thing. This board has a 12 MHz external oscillator. When setting up the RTC parameters, I can't get an even 625 Hz with the dividers available. I can go slight above, or slightly below. Would one be better than the other? Could this be related to the above issue?
- Code: Select all
//.prescaler = 25 - 1, // 8MHz / 32 / 16 / 25 == 625Hz
//.prescaler = 37 - 1, // 12MHz / 32 / 16 / 37 == 633Hz
.prescaler = 38 - 1, // 12MHz / 32 / 16 / 38 == 617Hz
Thanks in advance!!