summaryrefslogtreecommitdiff
path: root/stmhal/system_stm32.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-08-29 17:03:28 +1000
committerDamien George <damien.p.george@gmail.com>2017-08-29 17:03:28 +1000
commit8388ec4e35142539fb09d2a9ef5981b5732a349f (patch)
tree7ae59d98af7d0238ef56fec5fea92d5e4361b506 /stmhal/system_stm32.c
parentfe6f0354f6c1392dbdcfc7d9331c6a5ef3b3773a (diff)
stmhal: Update to new STM Cube HAL library.
This upgrades the HAL to the versions: - F4 V1.16.0 - F7 V1.7.0 - L4 V1.8.1 The main changes were in the SD card driver. The vendor changed the SD read/write functions to accept block number intead of byte address, so there is no longer any need for a custom patch for this in stm32lib. The CardType values also changed, so pyb.SDCard().info() will return different values for the 3rd element of the tuple, but this function was never documented.
Diffstat (limited to 'stmhal/system_stm32.c')
-rw-r--r--stmhal/system_stm32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/stmhal/system_stm32.c b/stmhal/system_stm32.c
index 7fc16b148..ed843af82 100644
--- a/stmhal/system_stm32.c
+++ b/stmhal/system_stm32.c
@@ -113,7 +113,10 @@ void __fatal_error(const char *msg);
#define CONFIG_RCC_CR_2ND (RCC_CR_HSEON || RCC_CR_CSSON || RCC_CR_PLLON)
#define CONFIG_RCC_PLLCFGR (0x24003010)
-#if defined(MCU_SERIES_F7)
+#if defined(MCU_SERIES_F4)
+const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
+const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};
+#elif defined(MCU_SERIES_F7)
const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};
#endif