- update to NuttX with stm32f4 and stm32f7 SPI DMA internal buffers
- remove explicit DMA buffer allocations from new IMU drivers
- restore original BOARD_DMA_ALLOC_POOL_SIZE
- decrease SPI DMA thresholds based on fmu-v2/v3/v4/v5 bench testing
instead of a static per-driver array.
Reduces BSS RAM usage by a couple of 100 Bytes (linear increase with num
drivers).
Downsides:
- a bit more runtime overhead
- less isolation, locking required
- a bit more complex
* MC_HTE: unitialize with hover_thrust parameter
* MC_HTE: constrain hover thrust setter between 0.1 and 0.9
* MC_HTE: integrate with land detector and velocity controller
* MCHoverThrustEstimator: Always publish an estimate even when not fusing measurements. This is required as the land detector and the position controller need to receive a hover thrust value.
* MC_HTE: use altitude agl threshold to start the estimator
local_position.z is relative to the origin of the EKF while dist_bottom
is above ground
Co-authored-by: bresch <brescianimathieu@gmail.com>
Running the sensors module out of the same WQ thread as the estimator, position, and attitude controllers is a bit safer and prevents potential priority and starvation issues. There is a very small increase in latency (~50 us) between sensors and ekf2 execution (on average). This also saves a little bit of memory (~ 3 kB) and cpu (~1-1.5% depending on the board).
Chip-select and SPI initialization uses the new config, whereas the drivers
still use the existing defines.
The configuration in board_config.h can be removed after all drivers are
updated.
The existing behavior is unexpected: if the work item is already on the
runnable queue, it will still be triggered after a call to ScheduleClear().
This can lead to race conditions.
- nuttx in PX4/Firmware (b7a83e23c5e50896bb137266cf89ff928dfaae42): d509b1edd7
- nuttx current upstream: bf646dcf46
- Changes: d509b1edd7...bf646dcf46
bf646dcf46 2020-03-03 Daniel Agar - [BACKPORT] stm32h7: spi_exchange (no dma) available with CONFIG_STM32H7_SPI_DMATHRESHOLD
f2a7ef0ade 2020-03-03 Daniel Agar - [BACKPORT] stm32f7: spi_exchange (no dma) available with CONFIG_STM32F7_SPI_DMATHRESHOLD
7ffc59ba3d 2020-03-03 Daniel Agar - [BACKPORT] stm32: spi_exchange (no dma) available with CONFIG_STM32_SPI_DMATHRESHOLD
d1c8fdb5fb 2020-03-02 Daniel Agar - [BACKPORT] arm/stm32h7 add STM32H7_SPI_DMATHRESHOLD
fa8d636118 2020-03-02 Daniel Agar - [BACKPORT] stm32f76xx77xx_dma.h fix DMAMAP_SPI2_RX_2/DMAMAP_SPI2_TX_2
762d80b217 2020-03-02 Daniel Agar - [BACKPORT] arm/stm32f7 add STM32F7_SPI_DMATHRESHOLD
4f4bbbbf1c 2020-03-02 Daniel Agar - [BACKPORT] arm/stm32 add STM32_SPI_DMATHRESHOLD
Co-authored-by: PX4 Build Bot <bot@px4.io>
* Introduce "px4_arch_adc_reference_v"
* Revert "Introduce "px4_arch_adc_reference_v""
This reverts commit 93691fbbd55a1b8da8c190e225b318067d90399b.
* use structure to return sample count and vref at the same time
* Revert "use structure to return sample count and vref at the same time"
This reverts commit 9cfd1c173cda51495f766a3f678c2202d67725fd.
* Revert "Revert "Introduce "px4_arch_adc_reference_v"""
This reverts commit edb7f7603e4471163ffb0fc6fc62ad2e30336e91.
* fix missed reference
* remove unecessary channel specific vref
* Update src/drivers/drv_adc.h
Co-Authored-By: David Sidrane <David.Sidrane@Nscdg.com>
* Update src/drivers/drv_adc.h
Co-Authored-By: David Sidrane <David.Sidrane@Nscdg.com>
* Introduce BOARD_ADC_POS_REF_V
Co-authored-by: David Sidrane <David.Sidrane@Nscdg.com>
- checked register mechanism and simple watchdog
- driver checks for errors gradually and can reconfigure itself
- respect IMU_GYRO_RATEMAX at the driver level
- fixed sensor INT16_MIN and INT16_MAX handling (y & z axis are flipped before publishing)
- increased sensor_gyro_fifo max size (enables running the driver much slower, but still transferring all raw data)
- PX4Accelerometer/PX4Gyroscope remove unnecessary memsets
It turns out that ekf2 needs more stack when sideslip fusion fails.
Sideslip fusion is currently only enabled for fixedwing by default and
not executed in testing.
- reduces amount of board configuration required
- removes the cyclic dependency between io_timers_t and timer_io_channels_t
Fixes a bug in the fmuk66-v3 config: the 2. timer has 3 channels associated
not 2.
Fixes a bug in the modelai config: the 2. timer has 4 channels associated.