Skip to content

Commit 94dfc88

Browse files
committed
mcu/stm32h503: Update mcu_cli
stm32h503 has even less peripherals then stm32h523. This exclude code that would not build for this MCU. Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
1 parent 0130bd3 commit 94dfc88

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

hw/mcu/stm/stm32h5xx/mcu_cli/src/mcu_cli.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,21 +221,28 @@ print_ahb2_peripherals(struct streamer *streamer, bool all)
221221
#endif
222222
}
223223

224+
#if defined(RCC_AHB4ENR_SDMMC1EN)
225+
static const char bus_width[4] = "148?";
226+
224227
uint32_t sdmmc_sck_freq(uint32_t f, SDMMC_TypeDef *sdmmc)
225228
{
226229
uint32_t div = ((sdmmc->CLKCR & SDMMC_CLKCR_CLKDIV_Msk) >> SDMMC_CLKCR_CLKDIV_Pos) * 2;
227230
if (div == 0) div = 1;
228231
return f / div;
229232
}
233+
#endif
230234

231235
static void
232236
print_ahb4_peripherals(struct streamer *streamer, bool all)
233237
{
234238
char buf[20];
235239
char buf1[20];
236-
static const char bus_width[4] = "148?";
237240
uint32_t freq;
238241

242+
(void)freq;
243+
(void)buf;
244+
(void)buf1;
245+
239246
#if defined(RCC_AHB4ENR_OTFDEC1EN)
240247
if (all || RCC->AHB4ENR & RCC_AHB4ENR_OTFDEC1EN) {
241248
streamer_printf(streamer, " OTFDEC1 %s\n", on_off_state(RCC->AHB4ENR & RCC_AHB4ENR_OTFDEC1EN));
@@ -448,7 +455,10 @@ print_apb1_peripherals(struct streamer *streamer, bool all)
448455
#endif
449456
}
450457

458+
#ifdef RCC_APB2ENR_SAI1EN
451459
static const char *sai_clk_src[] = {"pll1_q_ck", "pll2_p_ck", "pll3_p_ck", "AUDIOCLK", "per_ck"};
460+
#endif
461+
452462
static const char *usb_clk_src[] = {"---", "pll1_q_ck", "pll3_q_ck", "hsi48_ker_ck"};
453463

454464
static void

0 commit comments

Comments
 (0)