PX4 System changes Supporting STM32H7

stm32:ToneAlarmInterfacePWM TIM15-TIM17 have a BDTR Register

common:board_crashdump Add H7 support

stm32/board_mcu_version:Support H7

PX4 ADC:Use 32 interface and resoution abstraction

Added PX4 stm32h7 ADC driver

stm32h7:adc fix ADC ready check

fmu: handle BOARD_HAS_PWM==5

cmake: improve error handling for NuttX olddefconfig failures

WorkQueueManager:Quiet loadmon stack warning

camera_trigger:GPIO support < 6 GPIO

Adjust stack sizes (under hw stack check)

PX4 System changes Supporting STM32H7 PX4IO Driver

aerotenna_ocpoc:ADC add px4_arch_adc_dn_fullcount

init.cmake:Track Upstream change needing Make.def at config time

PX4 System changes Supporting STM32H7

NuttX CMakeLists.txt Track upstream changes

Common board_crashdump add header and px4 config

NuttX simplify callinb make libapps

Use UINT32_MAX for error return

drivers:uavcannode NuttX chip is now hardware

drivers:uavcanesc NuttX chip is now hardware

px4io:Avoid Race on AP to PX4 IO upgrade
This commit is contained in:
David Sidrane
2019-11-16 11:43:42 +01:00
committed by Lorenz Meier
parent 58799dc7d1
commit e847698c9f
32 changed files with 1559 additions and 98 deletions
@@ -3,7 +3,7 @@
#include "gpio.h"
#include <cstring>
constexpr uint32_t CameraInterfaceGPIO::_gpios[6];
constexpr uint32_t CameraInterfaceGPIO::_gpios[ngpios];
CameraInterfaceGPIO::CameraInterfaceGPIO():
CameraInterface(),
@@ -25,7 +25,7 @@ void CameraInterfaceGPIO::setup()
{
for (unsigned i = 0, t = 0; i < arraySize(_pins); i++) {
// Pin range is from 1 to 6, indexes are 0 to 5
// Pin range is from 1 to 5 or 6, indexes are 0 to 4 or 5
if (_pins[i] >= 0 && _pins[i] < (int)arraySize(_gpios)) {
uint32_t gpio = _gpios[_pins[i]];
@@ -50,9 +50,17 @@ void CameraInterfaceGPIO::trigger(bool trigger_on_true)
void CameraInterfaceGPIO::info()
{
PX4_INFO("GPIO trigger mode, pins enabled : [%d][%d][%d][%d][%d][%d], polarity : %s",
_pins[5], _pins[4], _pins[3], _pins[2], _pins[1], _pins[0],
_trigger_invert ? "ACTIVE_LOW" : "ACTIVE_HIGH");
if (ngpios == 6) {
PX4_INFO("GPIO trigger mode, pins enabled : [%d][%d][%d][%d][%d][%d], polarity : %s",
_pins[5], _pins[4], _pins[3], _pins[2], _pins[1], _pins[0],
_trigger_invert ? "ACTIVE_LOW" : "ACTIVE_HIGH");
}
if (ngpios == 5) {
PX4_INFO("GPIO trigger mode, pins enabled : [%d][%d][%d][%d][%d], polarity : %s",
_pins[4], _pins[3], _pins[2], _pins[1], _pins[0],
_trigger_invert ? "ACTIVE_LOW" : "ACTIVE_HIGH");
}
}
#endif /* ifdef __PX4_NUTTX */
@@ -21,6 +21,11 @@ public:
void trigger(bool trigger_on_true);
void info();
#if defined(GPIO_GPIO5_OUTPUT)
static const int ngpios = 6;
#else
static const int ngpios = 5;
#endif
private:
@@ -30,13 +35,15 @@ private:
bool _trigger_invert;
static constexpr uint32_t _gpios[6] = {
static constexpr uint32_t _gpios[ngpios] = {
GPIO_GPIO0_OUTPUT,
GPIO_GPIO1_OUTPUT,
GPIO_GPIO2_OUTPUT,
GPIO_GPIO3_OUTPUT,
GPIO_GPIO4_OUTPUT,
#if defined(GPIO_GPIO5_OUTPUT)
GPIO_GPIO5_OUTPUT
#endif
};
uint32_t _triggers[arraySize(_gpios)];