This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I don't know how to configure the clock and the GPIO with CMSIS for cortex-M3

Hi all, I'm new and I'm doing a project to manage some ports in digital and ADC way but let me start for the basics.

I have the cortex-M3 stm32f103c6 microcontroller and I'm trying to create a project using CMSIS, CMSIS has a function to initialize the system called SystemInit() but when I look at it then the only thing that it aparently does is upload the system clock so someway it calls somewhere a function to initialize the clock of the microcontroller, I think this is done in startup_ARMCM3.c/h but I don't know, then I looked around and I've found that SystemInit() updates the SystemCore Clock variable to the value of XTAL/2 and when finally found XTAL definition it then has assigned 50000000UL, SystemClockUpdate simply assign to SystemCoreClock again SYSTEM_CLOCK.

What I don't know is:

1) Which funtion initializes the clock of the system.

2) Can I use that function to change the clock source in the system because I have around two days searching and I found nothing about it.

3) Is there CMSIS functions to manage GPIO for cortex-M3? I found nothing about it.

Having asked these question then I ask, Its better to use CMSIS or do I need to create my own libraries, I asked that because at the CMSIS documentation I found nothing until now to manage GPIO and when There are selections of libraries in CMSIS configuration for the cortex-M3 then nothing appeared for GPIO.

Thanks in advance for the help.