STM32F030CC stm32f0xx.h configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-16 06:09 AM
Hello all.
I am trying to configure UART interrupts, but I can't seem to find where/how to define which MCU am I using. When I made the project I chose the STM32F030CC which I am using, but in stm32f0xx.h file it seems like STM32f030 is selected. I will add some screenshots so it is easier to understand./* Uncomment the line below according to the target STM32F0 device used in your
application
*/
#if !defined (STM32F030) && !defined (STM32F031) && !defined (STM32F051) && \
!defined (STM32F072) && !defined (STM32F042) && !defined (STM32F091) && \
!defined (STM32F070xB) && !defined (STM32F070x6) && !defined (STM32F030xC)
/* #define STM32F030 */
/* #define STM32F031 */
/* #define STM32F051 */
/* #define STM32F072 */
/* #define STM32F070xB */
/* #define STM32F042 */
/* #define STM32F070x6 */
/* #define STM32F091 */
/* #define STM32F030xC */
I deleted /* */ in the #define STM32f030xC but it is still in gray color, and does not let me to compile.
This is how it looks like on/*!< Interrupt Number Definition */ section , STM32F030xC section is gray, but STM32F030 is not.
I uploaded
too. Can someone please help?
#stm32f0xx.h #stm32f030cc
- Labels:
-
STM32F0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-16 08:41 AM
Hi karlis77,
Check the preprocessor values defined for your project. STM32F030 should be defined there (check the options of your project depending on the used IDE).-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-17 02:05 AM
I checked the preprocessor macros and there is only DEBUG.
I have chosen STM32F030CC when I made the project.When I make project with STM32F051R8 with same method then everything works fine, and STM32F051R8 is chosen in stm32f0xx.h file. Why this does not work with STM32F030CC ? :\ Maybe I should contact with Microsoft Visual Studio support too...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-17 07:43 AM
Maybe you just need to slap in a couple of defines and move on, the developers of free tools are overwhelmed with thousands of new parts, and shifting libraries. Save them some time and DIY.
The SPL project templates would use these, and some board specific ones for the EVAL series.USE_STDPERIPH_DRIVERSTM32F030USE_DEFAULT_TIMEOUT_CALLBACKUSE_FULL_ASSERT (optional)The SPL model shouldn't require you to change library source. The inclusion of stm32f0xx.h should pull in the project specific stm32f0xx_conf.h file which should have board/project specific stuff, and pulls in the other include files for the peripherals. You'd have a local copy of that in the project, and modify it. The system_stm32f0xx.c file is also one that can be localized, as it deal with clocking models that are user driven.You might also want to specify HSE_VALUE if the default value is different.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-18 01:14 AM
Thanks for answer.
I used the preprocessor macros which you advised and copied a stm32f0xx_conf.h in project directory and it gets included in stm32f0xx.h when there is USE_STDPERIPH_DRIVER preprocessor macro, but there is another problem.When I open the stm32f0xx_conf.h it looks like this: