This change first pushes out the _reset_wait by 100 Ms.
which is about 3 time longer then the code take to execute.
Then it does the reset of the accel, gyro and mag and
the ends the wait by setting _reset_wait to now+10 us.
The MPU9250 and MPU6500 buth support 1 Mhz and 20 Mhz. Buy upping the clocc we will get the maximum clock rate the driver
supports that is <= 20 Mhz. This will boost the FMUv4Pro SPI speed to 11.25 Mhz (it was half that)
This commit fixed a bug were the mag was orphened on a reset.
That resulted in MAG timeouts on reset or test operations and
left the mag in a broken state.
We want to setup the mag interface with retries and report
failurs.
Move retry logic to contol point, instead of hiding re-reading
the ID in ak8963_check_id.
Allow it to fail once to overcome a read of 0 on firt read.
after 2 failure report error to console and reset the
mpu9250's I2C master (SPI to I2C bridge)
The same retry logic is used on the ak8963_read_adjustments
with a reset of the I2C master module after 5 fails. If it
fails fter 10 retires. Disabel the mad and report the failure
on the console, stating it is disabled.
On initialization, if after 3 retries to re-init the mpu9250 from
the checked registers values, it fails. Ensure thath the fact the
driver is exitting is logged to console.
Check that the mpu9250's configured registers match the settings
written to them. Attempt to fix any that do not up to 3 times.
printing erros to the console on mismatches and returning
faliure if after 3 attempts the any of the values are
still wrong.
MPU9250 is mostly an MPU6500 with a mag (AK8963) in the same package.
Support driving MPU6500 with the MPU9250 driver. The id of the driver
isn't set differently since this way it allows to force a recalibration.
Ideally MPU9250 driver could even not exist and the support for these
sensors be merged back in the MPU6000 that's more complete. This is an
intermediate step in that direction.
We propagate the bus parameters from the bus interface to the sensor
devices. Thus, the device ID of the sensor driver is set to the correct
bus id and address. Otherwise it would be zero, which is an issue if several MPU9250s
are running at the same time.
These headers files were missing from the header files that
I added them to; the fact that they were missing didn't
lead to compile errors because by coincidence the missing
headers are included in the source files before including
these headers. But, after the reordering of header inclusions
by Tools/fix_headers.sh, these cases will give rise to compiler
errors.
It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
Fix build error
Capitalization mistake for headers
Non-Mac compiler issue
Baudrate for crazyflie nrf and fix code style
Save space
Cleanup mpu9250 driver
Working crazyflie firmware build
* Console on USART3
* Could not disable building PX4IO firmware, currently commented out
Don't build PX4IO firmware if the board doesn't ask for it
Added crazyflie motor driver
Fixed wrong register
CLK_SEL is in PWR_MGMT_1
Initial I2C/SPI MPU9250 device
* Tested with I2C
* Need to add error checking
* Intermittent crash on stop call
Working ak8963 mag driver
Functional lps25h driver. Work in progress.
Works well enough to probe and allow sensors task to start.
Added serial port test module
HACK! Get sensors module working
Set crazyflie PWM range
Extend baudrate for Crazyflie's NRF radio
Added dummy tone alarm to allow for init
Added autostart script for Crazyflie