Posts

Showing posts with the label Peripheral Development

STM32 Microcontroller- GPIO Driver Development (Part-1)

Image
  GPIO Driver Development There are two files which we need to consider before developing any peripheral. 1.Driver file 2.Application file Driver File This is a header file which contains Microcontroller specific details such as: *The base addresses of various memories present in the microcontroller such as (Flash, SRAM1, SRAM2, ROM, etc). *The base addresses of various bus domains such as (AHBx domain, APBx domain). *The base addresses of various peripherals present in different bus domains of the microcontroller. *Clock Management macros(i.e, clock enable and clock disable micros) *Interrupts definition. *Peripheral Register definition structures. *Peripheral Register bit definition Define Base Addresses of various memories in the header file #define FLASH_BASEADDR         0x0800 0000U #define SRAM1_BASEADDR        0x2000 0000U #define SRAM2_BASEADDR        0x2000 1C00U #define ROM_BASEADDR      ...

STM32 Microcontroller- GPIO structure

Image
GPIO Pin and GPIO Port              GPIO pin stands for General Purpose Input Output. GPIO's typically used for reading digital signals, generating triggers for external components, issuing interrupts, waking up the processor and many. A GPIO port is a collection of some fixed numbers of I/O pins, STM32 based microcontroller support GPIO port of 16 pins PA.0 to PA.16.  Each GPIO Port is governed by many registers, These registers may vary depending upon the vendor who designs the microcontroller. Generally, in the microcontroller a GPIO port is govern by these registers. * Port Direction (Mode) Register - By using these registers, we can set the direction or mode as an input, output, analog etc. * Port Input Data Register - It is used to read from a GPIO port. * Port Output Data Register - It is used to write to a GPIO port.  Enabling and Disabling GPIO Ports To enable or disable any particular peripheral, we need to enable/disable its intern...

STM32 Microcontroller with Peripheral Development

Image
  Embedded System           An Embedded System is a combination of computer hardware and software designed for a specific function. These systems might also function within a larger system. These systems can be programmable or have a fixed functionality.  In order to work with embedded systems, it is essential to work with a specific microcontroller to understand its hardware and software design. L et us start working on STM32 and its peripheral development. Architecture of Microcontroller Key Points to understand the Architecture of Microcontroller *Memory Map- The program of the microcontroller is stored in the memory. It shows what is included in each memory region. * Oscillator - The oscillator circuit generates the clock pulses so that all internal operations are synchronized. * Input/ Output Ports - Controller communicates with the external world through I/O ports. * Interrupts - This are the signals that informs microcontroller to stop the curre...