diff --git a/inc/mcu/at32/f4.h b/inc/mcu/at32/f4.h index 8be940c..23de004 100644 --- a/inc/mcu/at32/f4.h +++ b/inc/mcu/at32/f4.h @@ -90,6 +90,7 @@ extern unsigned int sram_kb; enum { F4SM_v4 = 0, F4SM_v4_slim, + F4SM_v4_1, }; /* Core floppy pin assignments vary between F4 submodels (except INDEX, RDATA, diff --git a/src/mcu/at32f4/board.c b/src/mcu/at32f4/board.c index 49ed9ca..fee0667 100644 --- a/src/mcu/at32f4/board.c +++ b/src/mcu/at32f4/board.c @@ -70,6 +70,11 @@ const static struct board_config _board_config[] = { .hse_byp = TRUE, .user_pins = _user_pins_v4_slim, .msel_pins = _msel_pins_v4_slim }, + [F4SM_v4_1] = { + .hse_mhz = 8, + .flippy = TRUE, + .user_pins = _user_pins_v4, + .msel_pins = _msel_pins_v4 }, }; const struct core_floppy_pins *core_floppy_pins; @@ -143,6 +148,7 @@ static void mcu_board_init(void) { switch (gw_info.hw_submodel) { case F4SM_v4: + case F4SM_v4_1: gpio_pull_up_pins(gpioa, 0x0101); /* PA0,8 */ gpio_pull_up_pins(gpiob, 0x1803); /* PB0-1,11-12 */ gpio_pull_up_pins(gpioc, 0xffff); /* PC0-15 */ diff --git a/src/mcu/at32f4/floppy.c b/src/mcu/at32f4/floppy.c index 24de058..3290b17 100644 --- a/src/mcu/at32f4/floppy.c +++ b/src/mcu/at32f4/floppy.c @@ -152,6 +152,7 @@ static uint8_t mcu_get_floppy_pin(unsigned int pin, uint8_t *p_level) { switch (gw_info.hw_submodel) { case F4SM_v4: + case F4SM_v4_1: if (pin == 34) { *p_level = gpio_read_pin(gpiob, 15); return ACK_OKAY; diff --git a/src/mcu/at32f4/testmode.c b/src/mcu/at32f4/testmode.c index 3341cff..251051f 100644 --- a/src/mcu/at32f4/testmode.c +++ b/src/mcu/at32f4/testmode.c @@ -63,6 +63,7 @@ uint8_t testmode_init(void) { switch (gw_info.hw_submodel) { case F4SM_v4: + case F4SM_v4_1: return ACK_OKAY; } return ACK_BAD_COMMAND;