Page 1 of 1

Error ? HSI_VALUE missing in lib file stm32f1xx.c

Posted: Tue Jun 16, 2020 5:14 am
by wogoos
I have a question
I work with the Arduino 1.8.12 IDE used for programming stm32f103C8 processors or the blue pill. The first time I installed it it didn't compile due to a missing #define HSI_VALUE and define HSE_VALUE Statement in file stm32f1xx.c after line 77
It this point I inserted the the following code which I found

Code: Select all

#if !defined  (HSE_VALUE) 
  #define HSE_VALUE               8000000U /*!< Default value of the External oscillator in Hz.
                                                This value can be provided and adapted by the user application. */
#endif /* HSE_VALUE */

#if !defined  (HSI_VALUE)
  #define HSI_VALUE               8000000U /*!< Default value of the Internal oscillator in Hz.
                                                This value can be provided and adapted by the user application. */
#endif /* HSI_VALUE */
after adding this code it compiled without a problem.
These are my questions:
  • Does any one else have seen this problem also?
  • Is this an error in the Arduino IDE STM library file stm32f1xx.c
  • Is adding the code the way to solve my initial problem.
  • are the values HSI_VALUE HSE_VALUE correct with respect to the blue pill
Hope some one can tell me more
Thanks

Re: Error ? HSI_VALUE missing in lib file stm32f1xx.c

Posted: Tue Jun 16, 2020 7:11 am
by fpiSTM
The value are well defined:
https://github.com/stm32duino/Arduino_C ... h#L76-L121

Don't know exactly how you got this issue anyway this is not the root cause.