STM32 GPIO Lecture 20 : Enabling and disabling GPIO peripheral clock

Enabling and disabling GPIO peripheral clock


 

In this article, let’s understand about enabling and disabling of GPIO peripheral clocks.

RCC is the engine that controls the clock for all the domains of the microcontroller. Like the AHB domain, APB domain, processor domain, memory domain, etc. So, according to the block diagram of STM32F407xx discovery, various GPIO ports are connected to the AHB1 bus.

 

Enabling and disabling GPIO peripheral
Figure1. RCC clock control register

 

So that in RCC_AHB1ENR, we can find that enabling and disabling bits to control the clocks for various GPIO ports.

 

GPIO peripheral
Figure2.RCC AHB1 peripheral reset register (RCC_AHB1RSTR)

 

In RCC_AHB1ENR, we will find the bit positions to control the clock for various GPIO ports from GPIOA to GPIOI. So, to make a corresponding bit as 1, the clock will be enabled. To make a corresponding bit is equal to 0, the clock will be disabled.

 

FastBit Embedded Brain Academy Courses

Click here: https://fastbitlab.com/course1

FastBitLab

The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.