[riot-notifications] [RIOT-OS/RIOT] Missing SPI pre-scalars for STM32F7 (#10979)

Mohamed notifications at github.com
Sat Feb 9 06:14:00 CET 2019


#### Description
**File**: /RIOT/boards/common/stm32/include/cfg_spi_divtable.h
This file doesn't have values corresponding to APBx clock = 54M, and 108M

#### Steps to reproduce the issue
This was discovered while trying to add sd-card support, hence enabling SPI. I got compiler error. ABPx clocks need to match the values above to get this error.

Had to add these values (used existing utility to calculate it):

```
#define CFG_SPIDIV_54               \
    {       /* for 54000000Hz */    \
        7,  /* -> 210937Hz */       \
        6,  /* -> 421875Hz */       \
        5,  /* -> 843750Hz */       \
        3,  /* -> 3375000Hz */      \
        2   /* -> 6750000Hz */      \
    },

#define CFG_SPIDIV_108              \
    {       /* for 108000000Hz */   \
        7,  /* -> 421875Hz */       \
        7,  /* -> 421875Hz */       \
        6,  /* -> 843750Hz */       \
        4,  /* -> 3375000Hz */      \
        3   /* -> 6750000Hz */      \
    },
```

File with complete changes attached: 
[cfg_spi_divtable.h.txt](https://github.com/RIOT-OS/RIOT/files/2847538/cfg_spi_divtable.h.txt)

#### Expected results

Should compile successfully.

#### Actual results
#error "CFG_SPI_DIVTABLE: no prescalers for selected APB1 bus clock defined"

#### Versions
Operating system: Windows 10 Pro
Fairly recent RIOT.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/10979
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190208/8eaf9e54/attachment.html>


More information about the notifications mailing list