[riot-notifications] [RIOT-OS/RIOT] [RFC, WIP] drivers/periph_spi: improve API of spi_acquire (#15904)
notifications at github.com
Mon Sep 13 22:32:50 CEST 2021
> > Some MCU have SPI peripherals on different clock bus so we must add a bus parameter to the two new functions.
> But since `spi_clk_t` is opaque and can be defined differently for reach MCU, this could even be a `struct` if needed.
But spi_clk_t is the output of spi_get_clk() which basically doing something like return a prescaler >= source_clock / target frequency. So it need to know which source_clock to use i.e. on same54-xpro (SAM0_GCLK_PERIPH / 2) for SPI_DEV(0), ( SAM0_GCLK_48MHZ / 2) for SPI_DEV(1), or SAM0_GCLK_MAIN for SPI_DEV(2) (SPI_ON_QSPI). Or on nucleo-f103rb APB2 (72MHz) for SPI_DEV(0) or APB1 (36MHz) for SPI_DEV(1).
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications