L
L
Leonid2018-09-26 18:20:11
Programming
Leonid, 2018-09-26 18:20:11

Which line does the STM32F103c8t6 belong to - STM32F10X_MD or STM32F10X_MD_VL?

The datasheet indicates that stm32f103c8t6 refers to the medium series - " the STM32F103x8 and STM32F103xB are referred to as medium-density devices "
But in the header file " stm32f10x.h " you need to specify "Value Line" or just a medium:

/* #define STM32F10X_MD */     /*!< STM32F10X_MD: STM32 Medium density devices */
 /* #define STM32F10X_MD_VL */  /*!< STM32F10X_MD_VL: STM32 Medium density Value Line devices */

Judging by the setting of the main frequency in the " system_stm32f10x.c " file, it should be exactly - " STM32F10X_MD " in order to get 72MHz - " ". Otherwise, with " STM32F10X_MD_VL " we get only 24 MHz - " " Actually a piece from the file " system_stm32f10x.c ":#define SYSCLK_FREQ_72MHz 72000000
#define SYSCLK_FREQ_24MHz 24000000

#if defined (STM32F10X_LD_VL) || (defined STM32F10X_MD_VL) || (defined STM32F10X_HD_VL)
/* #define SYSCLK_FREQ_HSE    HSE_VALUE */
 #define SYSCLK_FREQ_24MHz  24000000
#else
/* #define SYSCLK_FREQ_HSE    HSE_VALUE */
/* #define SYSCLK_FREQ_24MHz  24000000 */ 
/* #define SYSCLK_FREQ_36MHz  36000000 */
/* #define SYSCLK_FREQ_48MHz  48000000 */
/* #define SYSCLK_FREQ_56MHz  56000000 */
#define SYSCLK_FREQ_72MHz  72000000
#endif

Therefore, I put - " #define STM32F10X_MD ", tell me if it's right ?!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Leonid, 2018-09-27
@sled

#define STM32F10X_MD

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question