Эх сурвалжийг харах

V4: Further restrict duplication of Act LED to TXO

Only the original V4 board requires this. The V4.1 board has a pin
header for the original Act signal.

Also make it clear that the duplication happens only on 403(A)
MCUs. It is not possible on 415 as it affects USB operation.
Keir Fraser 1 жил өмнө
parent
commit
0a38ab8846
1 өөрчлөгдсөн 4 нэмэгдсэн , 2 устгасан
  1. 4 2
      src/board.c

+ 4 - 2
src/board.c

@@ -93,8 +93,10 @@ void board_init(void)
     /* Activity LED is active low. */
     gpio_configure_pin(gpio_led, pin_led, GPO_pushpull(IOSPD_LOW, HIGH));
 #if defined(NDEBUG) && MCU == AT32F4
-    if (at32f4_series != AT32F415)
+    if ((gw_info.hw_submodel == F4SM_v4) && (at32f4_series != AT32F415)) {
+        /* GW V4 with 403(A) MCU duplicates Activity LED signal on pin TXO. */
         gpio_configure_pin(gpioa, 9, GPO_pushpull(IOSPD_LOW, HIGH));
+    }
 #endif
 }
 
@@ -103,7 +105,7 @@ void act_led(bool_t on)
 {
     gpio_write_pin(gpio_led, pin_led, on ? LOW : HIGH);
 #if defined(NDEBUG) && MCU == AT32F4
-    if (at32f4_series != AT32F415)
+    if ((gw_info.hw_submodel == F4SM_v4) && (at32f4_series != AT32F415))
         gpio_write_pin(gpioa, 9, on ? LOW : HIGH);
 #endif
 }