From 8bb0b3784b7f488790ba3ff67ee8ed89abb7979f Mon Sep 17 00:00:00 2001 From: Felix Widmaier Date: Fri, 30 Sep 2022 10:03:38 +0200 Subject: [PATCH] Update MotorWare patch for CAN firmware Updates the MotorWare patch for the CAN firmware to version "v18_patch2". Changes: - Fix `HAL_turnLedOn/Off`: The GPIO needs to be set to low to turn the LED on and high to turn it off. --- firmware/firmware_can/motorware_1_01_00_18.patch | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/firmware/firmware_can/motorware_1_01_00_18.patch b/firmware/firmware_can/motorware_1_01_00_18.patch index 74ef900..59778df 100644 --- a/firmware/firmware_can/motorware_1_01_00_18.patch +++ b/firmware/firmware_can/motorware_1_01_00_18.patch @@ -124,9 +124,15 @@ index 1f50131..9c7117f 100644 + GPIO_setHigh(obj->gpioHandle, GPIO_Number_26); + GPIO_setDirection(obj->gpioHandle, GPIO_Number_26, GPIO_Direction_Input); diff --git a/sw/modules/hal/boards/boostxldrv8305_revA/f28x/f2806x/src/hal_2mtr.h b/sw/modules/hal/boards/boostxldrv8305_revA/f28x/f2806x/src/hal_2mtr.h -index c463a3b..aab17f5 100644 +index c463a3b..b3c6064 100644 --- a/sw/modules/hal/boards/boostxldrv8305_revA/f28x/f2806x/src/hal_2mtr.h +++ b/sw/modules/hal/boards/boostxldrv8305_revA/f28x/f2806x/src/hal_2mtr.h +@@ -123 +123 @@ extern "C" { +-#define HAL_turnLedOff HAL_setGpioLow ++#define HAL_turnLedOff HAL_setGpioHigh +@@ -128 +128 @@ extern "C" { +-#define HAL_turnLedOn HAL_setGpioHigh ++#define HAL_turnLedOn HAL_setGpioLow @@ -643,5 +642,0 @@ static inline void HAL_readAdcDataWithOffsets(HAL_Handle handle,HAL_Handle_mtr h - value = (_iq)ADC_readResult(obj->adcHandle,ADC_ResultNumber_8); - value = _IQ12mpy(value,current_sf);