From 84bbe54e171c92efb669ccb9a4960e406c8afa17 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 9 Jan 2020 22:04:11 +0700 Subject: [PATCH] follow up to #261 - fix button pullup - flash using teensy_loader_cli - update boards.md --- docs/boards.md | 1 + hw/bsp/teensy_40/board.mk | 7 ++++--- hw/bsp/teensy_40/teensy40.c | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/boards.md b/docs/boards.md index 399278e52..c052552be 100644 --- a/docs/boards.md +++ b/docs/boards.md @@ -40,6 +40,7 @@ This code base already had supported for a handful of following boards (sorted a - [MIMX RT1050 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1050-evaluation-kit:MIMXRT1050-EVK) - [MIMX RT1060 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/mimxrt1060-evk-i.mx-rt1060-evaluation-kit:MIMXRT1060-EVK) - [MIMX RT1064 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/mimxrt1064-evk-i.mx-rt1064-evaluation-kit:MIMXRT1064-EVK) +- [Teensy 4.0 Development Board](https://www.pjrc.com/store/teensy40.html) ### NXP LPC diff --git a/hw/bsp/teensy_40/board.mk b/hw/bsp/teensy_40/board.mk index 4bfc48bbf..955603e3b 100644 --- a/hw/bsp/teensy_40/board.mk +++ b/hw/bsp/teensy_40/board.mk @@ -48,6 +48,7 @@ FREERTOS_PORT = ARM_CM7 JLINK_DEVICE = MIMXRT1062xxx6A JLINK_IF = swd -# flash by copying bin file to DAP Mass Storage -flash: $(BUILD)/$(BOARD)-firmware.bin - cp $< /media/$(USER)/RT1060-EVK/ +# flash by using teensy_loader_cli https://github.com/PaulStoffregen/teensy_loader_cli +# Make sure it is in your PATH +flash: $(BUILD)/$(BOARD)-firmware.hex + teensy_loader_cli --mcu=imxrt1062 -v -w $< diff --git a/hw/bsp/teensy_40/teensy40.c b/hw/bsp/teensy_40/teensy40.c index 9c905dbbb..7c2bee539 100644 --- a/hw/bsp/teensy_40/teensy40.c +++ b/hw/bsp/teensy_40/teensy40.c @@ -78,7 +78,8 @@ void board_init(void) // Button IOMUXC_SetPinMux( BUTTON_PINMUX, 0U); - gpio_pin_config_t button_config = { kGPIO_DigitalInput, 0, kGPIO_IntRisingEdge, }; + IOMUXC_SetPinConfig(BUTTON_PINMUX, 0x01B0A0U); + gpio_pin_config_t button_config = { kGPIO_DigitalInput, 0, kGPIO_NoIntmode }; GPIO_PinInit(BUTTON_PORT, BUTTON_PIN, &button_config); // UART