From 03fcc3301ca4d43405bfde3f706b5e221ceeb27a Mon Sep 17 00:00:00 2001 From: Peter van der Perk Date: Mon, 23 Dec 2024 16:07:29 +0100 Subject: [PATCH] mr-tropic implement gps safety led and add note regarding cd_ --- boards/nxp/mr-tropic/nuttx-config/include/board.h | 5 +++++ boards/nxp/mr-tropic/src/board_config.h | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/boards/nxp/mr-tropic/nuttx-config/include/board.h b/boards/nxp/mr-tropic/nuttx-config/include/board.h index 0f379dc008..d834362fd0 100644 --- a/boards/nxp/mr-tropic/nuttx-config/include/board.h +++ b/boards/nxp/mr-tropic/nuttx-config/include/board.h @@ -164,6 +164,11 @@ #define PIN_USDHC1_CMD (GPIO_USDHC1_CMD_1 | USDHC1_CMD_IOMUX) /* GPIO_SD_B0_00 */ #define PIN_USDHC1_CD (PIN_USDHC1_D3) +/* #define PIN_USDHC1_CD (GPIO_USDHC1_CD_3 | USDHC1_CD_IOMUX) + * CD_B Pin works fine but somehow the driver has a timing issue with + * Thus use D3 instead + */ + /* Ideal 400Khz for initial inquiry. * Given input clock 198 Mhz. * 386.71875 KHz = 198 Mhz / (256 * 2) diff --git a/boards/nxp/mr-tropic/src/board_config.h b/boards/nxp/mr-tropic/src/board_config.h index 7c0265aa4c..6709dfe945 100644 --- a/boards/nxp/mr-tropic/src/board_config.h +++ b/boards/nxp/mr-tropic/src/board_config.h @@ -197,7 +197,16 @@ #define SAFETY_IOMUX (IOMUX_CMOS_OUTPUT | IOMUX_PULL_NONE | IOMUX_DRIVE_33OHM | IOMUX_SPEED_MEDIUM | IOMUX_SLEW_SLOW) #define SAFETY_SW_IOMUX (IOMUX_CMOS_INPUT | IOMUX_PULL_UP_22K | IOMUX_DRIVE_HIZ) -// TODO GPS LED GPIO_nSAFETY_SWITCH_LED_OUT +/* Safety Switch is HW version dependent on having an PX4IO + * So we init to a benign state with the _INIT definition + * and provide the the non _INIT one for the driver to make a run time + * decision to use it. + */ +#define GPIO_nSAFETY_SWITCH_LED_OUT_INIT /* EMC_39 */ (GPIO_PORT3 | GPIO_PIN25 | GPIO_INPUT | SAFETY_INIT_IOMUX) +#define GPIO_nSAFETY_SWITCH_LED_OUT /* EMC_39 */ (GPIO_PORT3 | GPIO_PIN25 | GPIO_OUTPUT | GPIO_OUTPUT_ONE | SAFETY_IOMUX) + +/* Enable the FMU to control it if there is no px4io fixme:This should be BOARD_SAFETY_LED(__ontrue) */ +#define GPIO_LED_SAFETY GPIO_nSAFETY_SWITCH_LED_OUT #define GPIO_SAFETY_SWITCH_IN /* GPIO_B0_12 GPIO2_IO12 */ (GPIO_PORT2 | GPIO_PIN12 | GPIO_INPUT | SAFETY_SW_IOMUX) /* Enable the FMU to use the switch it if there is no px4io fixme:This should be BOARD_SAFTY_BUTTON() */