Commit Graph

289 Commits

Author SHA1 Message Date
David Sidrane 00b4807443 mro_x21: Updates for NuttX 9.1.0+ External schedule_note 2020-09-16 21:32:04 -04:00
David Sidrane 4f5c88fc89 mro_x21-777: Updates for NuttX 9.1.0+ External schedule_note 2020-09-16 21:32:04 -04:00
David Sidrane 1e55ce0839 mro_ctrl-zero-f7: Updates for NuttX 9.1.0+ External schedule_note 2020-09-16 21:32:04 -04:00
David Sidrane aa1cb370e4 mro_x21 Updates for NuttX 9.1.0-
mro_x21: defconfig MMCSD enable multiblock
2020-09-16 21:32:04 -04:00
David Sidrane c9a323ebcc mro_x21-777 Updates for NuttX 9.1.0-
mro_x21-777: defconfig MMCSD enable multiblock
2020-09-16 21:32:04 -04:00
David Sidrane 2550d6f7c1 mro_ctrl-zero-f7 Updates for NuttX 9.1.0-
mro_ctrl-zero-f7: defconfig MMCSD enable multiblock
2020-09-16 21:32:04 -04:00
David Sidrane e8e463b875 cubepilot_cubeyellow Updates for NuttX 9.1.0-
cubepilot_cubeyellow: defconfig MMCSD enable multiblock
2020-09-16 21:32:04 -04:00
SalimTerryLi c037dbef21
Rename and move src/drivers/adc to src/drivers/adc/board_adc 2020-09-07 23:09:20 -04:00
Daniel Agar 2c3441aa90 boards: reduce CONFIG_NFILE_DESCRIPTORS 15 -> 12
- reduced now that calibration uses uORB::Subscription
 - can likely be reduced further (perhaps < 8) with additional testing
2020-08-21 10:12:13 -04:00
Daniel Agar fbc8e1b09e boards: mRo X2.1-777 fixes
- ardupilot bootloader compatibility (first 3 sectors)
 - clock tree fixes
 - start mavlink
 - start mpu9250 magnetometer (only onboard mag)
 - fixes https://github.com/PX4/Firmware/issues/15466
2020-08-09 14:24:49 -04:00
Daniel Agar e3d31a881e boards: NuttX disable posix message queues 2020-07-17 17:00:21 -04:00
Daniel Agar 13e34b32e6 new Bosch BMI088 IMU driver using FIFOs and DRDY 2020-06-11 12:25:13 -04:00
Daniel Agar 6f6efd60b7 boards: centralize optional external I2C sensor start
- configured with new parameter SENS_EXT_I2C_PRB
2020-06-10 09:04:13 -04:00
Daniel Agar 5e7d2e830d boards: delete old board.h boilerplate 2020-06-08 19:10:33 -04:00
Daniel Agar 5507c15bdc boards: move rgbled_pwm startup to appropriate boards 2020-06-08 16:49:46 -04:00
Daniel Agar d1c12ac7cf boards: mRo Control Zero fix IMU rotations 2020-06-04 11:34:31 -04:00
Daniel Agar 951969ba00
drivers/imu/invensense: new ICM20948 driver on SPI with AK09916 mag 2020-05-22 00:09:30 -04:00
Daniel Agar 746a8f5cf9 commander: reboot/shutdown usability fixes
- always check with state machine before reboot/shutdown
 - respect BOARD_HAS_POWER_CONTROL (shutdown from command, low battery, power button)
 - px4_shutdown_request add optional delay and always execute from HPWORK
 - px4_shutdown_request split out px4_reboot_request
2020-05-06 13:53:54 -04:00
Daniel Agar 28d2aca699 boards: include all procfs entries on boards that aren't flash constrained 2020-05-01 20:59:57 -04:00
Daniel Agar 8d0c92003a boards: remove all CONFIG_NXFONTS_DISABLE* 2020-05-01 20:59:57 -04:00
Daniel Agar 06478d9997 delete obsolete SENSORIOCSPOLLRATE/SENSORIOCRESET and systemcmds/config 2020-04-15 23:33:41 -04:00
mcsauder 6548fde024 Whitespace cleanup to quiet new blank line at EOF git hook. 2020-04-15 23:00:39 -04:00
Daniel Agar 1ac6230758 boards: always change default IMU_GYRO_RATEMAX on px4_fmu-v2/v3 and mro_x21
- this can lower cpu usage considerably on older boards
2020-04-15 21:52:02 -04:00
Daniel Agar 66eacd24bc
px4_fmu-v5_stackcheck: update stack sizes and add to Jenkins
- increase stack sizes to run cleanly under stackcheck
     - this is likely overkill for most boards, but using stackcheck to set our minimum ensures we have a very safe margin on regular builds and it's something we can currently afford
 - remove holybro_durandal-v1_stackcheck from test rack (there's only one unit)
2020-04-11 21:16:10 -04:00
Daniel Agar a89bba470a boards: STM32F76xxx/STM32F77xxx linker add ITCM RAM and .ramfuncs handling
- this doesn't currently change anything, but gets us ready to start
experimenting with using the small amount of instruction tightly memory
on STM32F7
 - the .ramfuncs section works with NuttX CONFIG_ARCH_RAMFUNCS
2020-04-08 13:20:54 -04:00
Daniel Agar 7aa7f0ed95 switch remaining boards to new InvenSense IMU drivers 2020-04-07 09:59:12 -04:00
Daniel Agar ad559a66a1 examples: add simple work_item example module 2020-04-06 09:43:55 -04:00
Daniel Agar 40b1043e12 NuttX boards minor lpwork and init stack increases 2020-04-02 23:39:17 -04:00
Daniel Agar 15332a7e56 boards: reduce CONFIG_NFILE_DESCRIPTORS 20 -> 15 2020-04-01 16:17:14 -04:00
Daniel Agar 7c8ab49eb9 boards: mro_ctrl-zero-f7 fix i2c
- STM32_HSI_FREQUENCY 24 MHz -> 16 MHz (required for NuttX stm32f7 i2c)
2020-04-01 14:27:33 -04:00
Daniel Agar ca81175b07 rename drivers/px4fmu -> drivers/pwm_out
- split out header
2020-03-31 19:12:31 -04:00
Daniel Agar 44bec269b0 boards: update all NuttX configs CONFIG_NSH_MAXARGUMENTS 12 -> 15 2020-03-25 17:59:22 -04:00
Daniel Agar f5fe50f839 invensense/icm20608g driver minor improvements
- interupt pin set active low and latch
 - relax retry timeout if configure failed
 - improve configured empty rate (sample rate) rounding
 - fix RegisterCheck
 - check FIFO count as part of full transfer and reset or adjust timing if necessary
 - rename DRV_IMU_DEVTYPE_ICM20608 -> DRV_IMU_DEVTYPE_ICM20608G
2020-03-25 01:05:38 -04:00
Beat Küng b156fe5787 boards: remove deprecated SPI + I2C defines from board_config.h
chip-selects are deselected in stm32_spiinitialize()
2020-03-24 09:46:20 -04:00
Beat Küng c4a19c8852 refactor icm20689: use driver base class 2020-03-24 09:46:20 -04:00
Beat Küng 54da4997ad refactor bmi088: use driver base class 2020-03-24 09:46:20 -04:00
Beat Küng 7626be0485 refactor mpu9250: use driver base class 2020-03-24 09:46:20 -04:00
Daniel Agar 8738c26426
boards: enable NuttX SPI DMA buffers
- 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
2020-03-22 19:24:26 -04:00
Beat Küng 8ebde51648 refactor hmc5883: use driver base class
Removes the calibration on startup, as these values were overwritten by
the system calibration values anyway.
So the only difference is that if all calibration scales were equal to 1,
the driver startup would have failed.
2020-03-17 23:31:17 -04:00
Beat Küng 969a77f889 refactor mpu6000: use driver base class 2020-03-17 23:31:17 -04:00
Beat Küng be0a205438 refactor ist8310: use driver base class 2020-03-17 23:31:17 -04:00
Daniel Agar 0ce9e113ff boards: stm32f4/f7 enable SPI_DMATHRESHOLD=32 2020-03-11 22:08:37 -04:00
Beat Küng 179c89b6bd board configs: extend board_dma_map.h with a table 2020-03-11 22:08:37 -04:00
Daniel Agar 8c2ba5f39f mro_x21-777: add board_dma_map.h and enable SPI1 DMA 2020-03-11 22:08:37 -04:00
Daniel Agar 38a10fc7fc mro_x21: add board_dma_map.h and enable SPI1 DMA 2020-03-11 22:08:37 -04:00
Daniel Agar f309e3a5ba mro_ctrl-zero-f7: add board_dma_map.h and enable SPI1/SPI5 DMA 2020-03-11 22:08:37 -04:00
Daniel Agar f9794e99f8
move hover_thrust_estimator to new module (mc_hover_thrust_estimator)
* 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>
2020-03-11 21:20:54 -04:00
Daniel Agar 46a09b711f boards: increase STDIO buffer size where we can afford it 2020-03-11 17:19:44 -04:00
Daniel Agar 505afc6063 boards: increase LPWORKSTACKSIZE 1536 -> 1600 2020-03-10 12:53:01 -04:00
Beat Küng 335623e11d SPI config: use enum to specify bus 2020-03-10 10:11:43 -04:00
Beat Küng b54e5a1c23 param: automatically update calibration ID params on import
This avoids the need for recalibration, and also cleans up other driver
ID's (merge separate accel/gyro).

The SPI address was previously set to a board-specific (arbitrary) value,
and is now set to 0. This will allow extending for multiple sensors of the
same type on the same bus.
2020-03-10 10:11:43 -04:00
Beat Küng 1851665fab boards: add new spi+i2c config
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.
2020-03-10 10:11:43 -04:00
Daniel Agar 4698a09b98 delete unmaintained outback challenge (OBC) bottle drop example 2020-03-05 14:09:31 -05:00
Beat Küng d74d094940 nuttx configs: disable nuttx timers which are used for PWM output
These are not required, and to be consistent we enforce disabling them now.
2020-02-13 03:49:16 -08:00
Beat Küng 03210f5386 mro/x21: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng bd3fe62fcf mro/x21-777: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng b3fe4a6691 mro/ctrl-zero-f7: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng 62b4f3487a io timer: remove some fields from io_timers_t and split out channel indexes
- 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.
2020-02-13 03:49:16 -08:00
Beat Küng b399698306 ist8310: remove calibration code
- it does nothing useful
- increases boot time by 2 seconds on pixhawk 4 due to a poll timeout:
IST8310 on I2C bus 3 at 0x0e (bus: 100 KHz, max: 400 KHz)
WARN  [ist8310] ERROR: TIMEOUT 2
2020-02-06 12:39:39 -05:00
Daniel Agar 036a45377d boards rename auav_x21 -> mro_x21 2020-01-22 15:33:02 -05:00
Daniel Agar 693d532bba
mRo x2.1 777 board support 2020-01-22 15:02:55 -05:00
Daniel Agar dc05ceaad2
create temperature_compensation module
- this is a new module for temperature compensation that consolidates the functionality previously handled in the sensors module (calculating runtime thermal corrections) and the events module (online thermal calibration)
 - by collecting this functionality into a single module we can optionally disable it on systems where it's not used and save some flash (if disabled at build time) or memory (disabled at run time)
2020-01-20 21:42:42 -05:00
David Sidrane 4e04781d1f mro_ctrl-zero-f7:Support Nuttx SDIO Fixes 2020-01-08 12:23:01 -05:00
Daniel Agar 9b66cbd2d9 Infineon DPS310 Barometer
- used as the primary barometer on the mRo Control Zero F7
2019-12-02 00:51:01 -05:00
Daniel Agar fd72e5e795 mRo ctrl zero updates
- add ICM20602 and ICM20648 data ready interrupts
 - enable Bosch BMI088 IMU
 - move HRT_TIMER to TIM3 (same timer as PPM channel)
2019-12-01 17:43:15 -05:00
Daniel Agar bc182e94e6
sensors split rc_update into new standalone module 2019-11-24 13:25:11 -05:00
Daniel Agar 5aaf1b100b delete unused md25 driver 2019-11-21 18:56:24 -05:00
Daniel Agar 8c38176d77 boards: alphabetize and sync common drivers and modules 2019-11-21 18:56:24 -05:00
Daniel Agar 84fe64b1c2
create new multicopter rate controller module (mc_rate_control) split out of mc_att_control 2019-11-19 17:03:11 -05:00
Daniel Agar 99aae8b891 NuttX use toolchain math.h and avoid empty drivers/Kconfig 2019-11-16 11:43:42 +01:00
David Sidrane 9032b64eaa mro:ctrl-zero-f7 BSP Updated to NuttX 8.1+ 2019-11-16 11:43:42 +01:00
Daniel Agar 668984b6b0 boards: start adc in rc.board_sensors 2019-11-11 17:08:24 -05:00
Daniel Agar 40850f58ee boards cleanup old nsh_archinitialize 2019-11-03 12:09:48 -05:00
Beat Küng 3b7c1b4ff1 src/drivers/boards: move to platforms/nuttx/src/px4/common 2019-10-30 11:48:47 +01:00
Beat Küng b30171ba8d board_common.h: move under platforms/common
Also move board_determine_hw_info and board_gpio_init under platforms/nuttx
2019-10-30 11:48:47 +01:00
Beat Küng 3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Daniel Agar e2cf501f9d
boards: increase CONFIG_MAX_TASKS 32->64 on all F7s (#13285)
On more complicated setups it's still possible to exceed 32 tasks. For example fmu-v5 with mavlink on every telem (+ USB), external spi usage (pmw3901), gimbal (vmount), multiple i2c sensors, and camera feedback is 35 tasks (with top running). This is a fairly extreme case, so I'm only going to increase CONFIG_MAX_TASKS on newer F7 boards.
2019-10-27 12:37:01 -04:00
Daniel Agar 6a0f5249f8
sensors: split out analog battery handling to new standalone battery_status module 2019-10-21 13:40:23 -04:00
Beat Küng 182efaa757 dshot: reduce static buffer size
And handle failures of up_dshot_init().

On Omnibus: reduces memory usage if dshot is enabled by ~1.0KB.
The buffer is roughly 1KB in size.
2019-10-11 08:14:17 +02:00
Daniel Agar 315141873e NuttX boards reduce CONFIG_MAX_TASKS 64 -> 32 (default) 2019-10-02 19:44:46 -04:00
Daniel Agar 26364d44c9
px4_work_queue: command line status output and shutdown empty queues
* adds a work_queue systemcmd that will bring a tree view of all active work queues and work items
 * WorkQueues now track attached WorkItems and will shutdown when the last WorkItem is detached
2019-10-02 12:23:17 -04:00
garfieldG bbb96cbd0c Mavlink startup script per board
-moved rc.mavlink to the boards optional rc additions (now it's called rc.board_mavlink) to handle board specific mavlink needs (mavlink over usb, ethernet, additional streams, etc.)
-mavlink module will be responsible to usb defaults, therefore less args are needed to be passed to mavlink module if one wants to use mavlink over usb.
-the way to check if connection is usb is by it's designated variable and not by config mode.
2019-09-29 10:46:08 -04:00
Daniel Agar 0486d69240 delete obsolete segway example 2019-09-28 15:05:50 -04:00
BazookaJoe1900 6ab5c2170e remove unused pca8574 and oreoled drivers 2019-09-04 08:05:08 -07:00
Beat Küng f3fccf53f6 src/drivers/{kinetis,stm32}: move to arch-specific directories 2019-08-30 07:59:44 +02:00
Beat Küng 1cb6c36a00 adc: refactor into arch-specific directories 2019-08-30 07:59:44 +02:00
Beat Küng ab43a83bed platform: restructure (NuttX) architecture-specific code
updated: tone_alarm, px4io_serial, px4_micro_hal
2019-08-30 07:59:44 +02:00
Daniel Agar b1d59c8817
px4fmu split safety button into new driver 2019-08-24 17:14:17 -04:00
Daniel Agar b7f0db62ba
mRo Control Zero F7 initial board support 2019-08-14 13:13:27 -04:00