Hello.
I am trying to programe the MPU6000 over SPI to wakeup every 1.25 Hz and read data from the the sensor.
I have made the following steps but after normal initialization it work ok - the Interrupt Comes, but if I write this function that sends it to sleep mode does not work anymore. The Interrupt never Comes no matter how hard I shake the sensor.
Where am I mistaking?
than you.
I do the following settings:
1- set in power management 1 register the 8 MHZ internal clock source.
2. set power management 2 to 0x0
3. in accel_config register (0x1C) write 0x00
4. set the DLPF to 256 HZ in CONFIG_register 0x1A
5. In INT_ENABLE register write BIT_MOT_EN (0x40)
6. IN INT_PIN_CFG write INT_READ_CLER (0x10)
7. in Motion threshold register (0x1F) write 0x05
8. Delay 50 miliseconds
9. IN pwrmanagement register2 (0x6C)write LP_WAKE_CTRL_5Hz and set the gyro in standby mode - set BITS_STBY_XG | BITS_STBY_YG | BITS_STBY_ZG bits.
10. In powermanagement1 register set the cylce bit to 1 and the disable the temperature sensor.BIT_CYCLE | BIT_TEMP_DIS.
Should I do something else?
Normaly when I shake the sensor it should wake up.
Am I missing something?
Normally by normal initialization before this function I set the accel to 2g and the gyro to 250°. The measuring frequency is 50 Hz and the filter DLPF is set to 20 Hz. The Interrupt is set to DATA_RDY_INT. And it work. The data Comes OK.
- Log in to post comments
phpbb Topic ID
15603