Skip to content

Commit

Permalink
Update MotorWare patch for CAN firmware
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
luator committed Sep 30, 2022
1 parent c7d218c commit 8bb0b37
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion firmware/firmware_can/motorware_1_01_00_18.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8bb0b37

Please sign in to comment.