Browse Source

Revert:Pull downs - bad levels cause motor spins

release/1.12
David Sidrane 4 years ago committed by Daniel Agar
parent
commit
32e92ba817
  1. 2
      boards/av/x-v1/src/init.c
  2. 2
      boards/cuav/nora/src/init.c
  3. 2
      boards/cuav/x7pro/src/init.c
  4. 2
      boards/cubepilot/cubeorange/src/init.c
  5. 2
      boards/cubepilot/cubeyellow/src/init.c
  6. 2
      boards/holybro/durandal-v1/src/init.c
  7. 2
      boards/holybro/kakutef7/src/init.c
  8. 2
      boards/holybro/pix32v5/src/init.c
  9. 2
      boards/modalai/fc-v1/src/init.c
  10. 2
      boards/modalai/fc-v2/src/init.c
  11. 2
      boards/mro/ctrl-zero-f7-oem/src/init.c
  12. 2
      boards/mro/ctrl-zero-f7/src/init.c
  13. 2
      boards/mro/ctrl-zero-h7-oem/src/init.c
  14. 2
      boards/mro/ctrl-zero-h7/src/init.c
  15. 2
      boards/mro/pixracerpro/src/init.c
  16. 2
      boards/nxp/fmuk66-e/src/init.c
  17. 2
      boards/nxp/fmuk66-v3/src/init.c
  18. 2
      boards/px4/fmu-v5/src/init.c
  19. 2
      boards/px4/fmu-v5x/src/init.cpp
  20. 2
      boards/px4/fmu-v6u/src/init.c
  21. 2
      boards/px4/fmu-v6x/src/init.c
  22. 2
      boards/spracing/h7extreme/src/init.c
  23. 5
      platforms/nuttx/src/px4/nxp/k66/include/px4_arch/micro_hal.h
  24. 1
      platforms/nuttx/src/px4/nxp/rt106x/include/px4_arch/micro_hal.h
  25. 1
      platforms/nuttx/src/px4/stm/stm32_common/include/px4_arch/micro_hal.h

2
boards/av/x-v1/src/init.c

@ -90,7 +90,7 @@ static int configure_switch(void); @@ -90,7 +90,7 @@ static int configure_switch(void);
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/cuav/nora/src/init.c

@ -106,7 +106,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -106,7 +106,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/cuav/x7pro/src/init.c

@ -106,7 +106,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -106,7 +106,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/cubepilot/cubeorange/src/init.c

@ -97,7 +97,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -97,7 +97,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/cubepilot/cubeyellow/src/init.c

@ -97,7 +97,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -97,7 +97,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/holybro/durandal-v1/src/init.c

@ -138,7 +138,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -138,7 +138,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/holybro/kakutef7/src/init.c

@ -120,7 +120,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -120,7 +120,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/holybro/pix32v5/src/init.c

@ -139,7 +139,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -139,7 +139,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/modalai/fc-v1/src/init.c

@ -137,7 +137,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -137,7 +137,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/modalai/fc-v2/src/init.c

@ -135,7 +135,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -135,7 +135,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/mro/ctrl-zero-f7-oem/src/init.c

@ -128,7 +128,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -128,7 +128,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/mro/ctrl-zero-f7/src/init.c

@ -128,7 +128,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -128,7 +128,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/mro/ctrl-zero-h7-oem/src/init.c

@ -100,7 +100,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -100,7 +100,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/mro/ctrl-zero-h7/src/init.c

@ -100,7 +100,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -100,7 +100,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/mro/pixracerpro/src/init.c

@ -100,7 +100,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -100,7 +100,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/nxp/fmuk66-e/src/init.c

@ -117,7 +117,7 @@ __END_DECLS @@ -117,7 +117,7 @@ __END_DECLS
void board_on_reset(int status)
{
for (int i = 0; i < 6; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/nxp/fmuk66-v3/src/init.c

@ -117,7 +117,7 @@ __END_DECLS @@ -117,7 +117,7 @@ __END_DECLS
void board_on_reset(int status)
{
for (int i = 0; i < 6; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/px4/fmu-v5/src/init.c

@ -139,7 +139,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -139,7 +139,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/px4/fmu-v5x/src/init.cpp

@ -143,7 +143,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -143,7 +143,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/px4/fmu-v6u/src/init.c

@ -140,7 +140,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -140,7 +140,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/px4/fmu-v6x/src/init.c

@ -140,7 +140,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -140,7 +140,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

2
boards/spracing/h7extreme/src/init.c

@ -121,7 +121,7 @@ __EXPORT void board_peripheral_reset(int ms) @@ -121,7 +121,7 @@ __EXPORT void board_peripheral_reset(int ms)
__EXPORT void board_on_reset(int status)
{
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}
if (status >= 0) {

5
platforms/nuttx/src/px4/nxp/k66/include/px4_arch/micro_hal.h

@ -112,8 +112,7 @@ int kinetis_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge, boo @@ -112,8 +112,7 @@ int kinetis_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge, boo
#define px4_arch_gpiosetevent(pinset,r,f,e,fp,a) kinetis_gpiosetevent(pinset,r,f,e,fp,a)
#define _PX4_MAKE_GPIO(pin_ftmx, io) ((((uint32_t)(pin_ftmx)) & ~(_PIN_MODE_MASK | _PIN_OPTIONS_MASK)) |(io))
#define PX4_MAKE_GPIO_INPUT(gpio) _PX4_MAKE_GPIO((gpio), GPIO_PULLUP)
#define PX4_MAKE_GPIO_INPUT_PULL_DOWN(gpio) _PX4_MAKE_GPIO((gpio), GPIO_PULLDOWN)
#define PX4_MAKE_GPIO_OUTPUT(gpio) _PX4_MAKE_GPIO((gpio), GPIO_HIGHDRIVE)
#define PX4_MAKE_GPIO_INPUT(gpio) _PX4_MAKE_GPIO(gpio, GPIO_PULLUP)
#define PX4_MAKE_GPIO_OUTPUT(gpio) _PX4_MAKE_GPIO(gpio, GPIO_HIGHDRIVE)
__END_DECLS

1
platforms/nuttx/src/px4/nxp/rt106x/include/px4_arch/micro_hal.h

@ -105,7 +105,6 @@ int imxrt_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge, bool @@ -105,7 +105,6 @@ int imxrt_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge, bool
#define px4_arch_gpiosetevent(pinset,r,f,e,fp,a) imxrt_gpiosetevent(pinset,r,f,e,fp,a)
#define PX4_MAKE_GPIO_INPUT(gpio) (((gpio) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | (GPIO_INPUT | IOMUX_SCHMITT_TRIGGER | IOMUX_PULL_UP_47K | IOMUX_DRIVE_HIZ))
#define PX4_MAKE_GPIO_INPUT_PULL_DOWN(gpio) (((gpio) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | (GPIO_INPUT | IOMUX_SCHMITT_TRIGGER | IOMUX_PULL_DOWN_100K | IOMUX_DRIVE_HIZ))
#define PX4_MAKE_GPIO_OUTPUT(gpio) (((gpio) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | (GPIO_OUTPUT | GPIO_OUTPUT_ZERO | IOMUX_CMOS_OUTPUT | IOMUX_PULL_KEEP | IOMUX_DRIVE_33OHM | IOMUX_SPEED_MEDIUM | IOMUX_SLEW_FAST))
__END_DECLS

1
platforms/nuttx/src/px4/stm/stm32_common/include/px4_arch/micro_hal.h

@ -103,7 +103,6 @@ __BEGIN_DECLS @@ -103,7 +103,6 @@ __BEGIN_DECLS
#define px4_arch_gpiosetevent(pinset,r,f,e,fp,a) stm32_gpiosetevent(pinset,r,f,e,fp,a)
#define PX4_MAKE_GPIO_INPUT(gpio) (((gpio) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | (GPIO_INPUT|GPIO_PULLUP))
#define PX4_MAKE_GPIO_INPUT_PULL_DOWN(gpio) (((gpio) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | (GPIO_INPUT|GPIO_PULLDOWN))
#define PX4_MAKE_GPIO_OUTPUT(gpio) (((gpio) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR))
#define PX4_GPIO_PIN_OFF(def) (((def) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_2MHz))

Loading…
Cancel
Save