IDE To be used: Simplicity Studio – Silicon Labs (silabs.com) SDK to be used: Gecko Platform Silicon Labs (silabs.com) SDK documentation: EFR32BG22 Gecko MCU and Peripheral Software Documentation – v5.9 – MCU EFR32BG22 API Documentation Silicon Labs (silabs.com) HDK to be used:SLTB010A EFR32BG22 Thunderboard Kit – Silicon Labs (silabs.com) HDK manual: UG415: Thunderboard EFR32BG22 User’s Guide (silabs.com) Microcontroller datasheet: EFR32BG22C112 Wireless Gecko SoC Data Sheet (silabs.com) Microcontroller Reference manual: EFR32xG22 Wireless Gecko Reference Manual (silabs.com)
Automotive Development board to enable hassle free learning and development across multiple automotive technologies
Overview So hello guys, welcome to series of Microcontroller tutorials. As Microcontrollers are big thing happening across the globe, but to learn about microcontrollers becomes quite challenging as most of the content on web is theoretical based and quite unorganized. Or the content is only roaming around 2-3 microcontrollers (Arduino, ESP or PIC), even though there are number of Microcontrollers of different vendors. Also, framework of Arduino and Arduino IDE hides most of the things that are going inside the microcontrollers. Would recommend viewers to read these 3 blogs in order, so as to get understanding on how to get started with any Microcontroller and in what order. How to start with Microcontrollers? – gettobyte Hardware Development Kit In Mcrocontrollers – gettobyte Software Development Kit In Microcontrollers – gettobyte Here at Gettobyte, you will get content on microcontroller tutorials for different vendors in chronological way and covering the topics, in a much more interesting and story kind of way to make people understood easily. NXP Semiconductors – gettobyte Nordic SoC – gettobyte STM32 MCU’s – gettobyte Texas Instruments – gettobyte Silicon Labs – gettobyte AVR MCU – gettobyte ESP SoC – gettobyte Which will help you to learn important skills to build you Carrer on Semiconductor Industry and also help you in product development/DIY projects for different Industries, so as to make embedded devices with Industry standard Microcontroller. In return what Gettobyte platform seeks is that if you find these blogs insightful, then share it with people so make the reach more. And provide with constructive feedback and reviews in blogs comment section . If you guys want to start with microcontroller coding and looking for chronological order, then you have come to right place. In the last 2 blog: we get to know a lot about microcontrollers and how to start with them. And Hardware Development KIT in microcontrollers. One of the essential and important things to know before starting with microcontrollers is Software Development Kit. So, let’s start with it. In this blog we are going to start with another essential and important things to know before starting with microcontrollers that is Software Development Kit (SDK). Objective of this blog Objective of this blog, will be to understand: What is Software Development Kit in Embedded (SDK). Different components in Software Development Kit in Embedded. Why there is need of Software Development Kit in Embedded. What is Software Development Kit? Software Development Kit in embedded is collection of Software tools and applications, Software libraries, documentations to program the microcontrollers via host computer. Software Development Kit(SDK) majorly include: Software Stack for Microcontrollers Code Configuration Tools Software Debugging Tools Software drivers for debuggers and programmers. Integrated Development Environment (IDE) Software Stack for Microcontrollers Microcontrollers are not only hardware devices, but there is also very good amount of software used in microcontroller to run them, which are termed as software stack for microcontrollers. Software stack for microcontrollers can be divided into following components: Peripherals Drivers/Real Time Drivers: for using the peripherals of microcontrollers. This software controls the registers of microcontrollers to configure, enable, disable and use the different peripherals of microcontroller. Every MCU vendor design and develop these Drivers for their corresponding microcontroller. so that application developers can directly start with application development instead of creating these drivers on own. These drivers are kind of bare metal programming, as it is register level programming. which are written using C/CPP language using the concepts like Functions, loops, variables, static, user defined data types (typedef, Enums, structures), arrays and etc. For e.g. NXP semiconductors has S32K Standard software stack for its S32K1 Microcontrollers. Texas Instruments has Miscellaneous Stack: Peripheral Drivers is stack to drive the microcontroller peripherals, but with these peripheral drivers their is use of other embedded software technologies to build complex and real time applications like RTOSes(FreeRTOS, ChibiOS, Mbed and etc), IoT protocols Stacks( WiFi, BLE, Lora, LwIP, MbedTLS,and etc), Bootrom(openBLT), Sensor & Module drivers, crytography stack for providing security and safety in embedded applications, mathematics or signal processing algorithms stack for doing complex calculations. These all are also written using C/CPP language and it requires knowledge of programming along with hardware knowledge too. Peripheral Abstraction Layer/Hardware Abstraction Layer: This software stack is for code portablity and modularity in microcontrollers. Their are so many microcontrollers out their and for every MCU their is different peripheral driver. So if we change the microcontroller in our application, we need to rewrite the code of our application. This can be very cumbersome, there is need of some form of abstraction layer, through which our application end APIs remain same and just low-level driver files has to be changed if hardware is changed. This is done through the concept of C/CPP programming with use of programming concepts like, Classes, Structures, function pointers, templates, MACRO definition, linked lists and etc. In the large code bases like Autosaur and Ardupilot, Code portability is very essential, and use of Abstraction layers are heavy implemented through advance programming concepts like that of OOPS. For the starting we would just be needing peripheral drivers and abstraction layer stack of microcontrollers. These are provided by corresponding microcontroller vendors. // Examples of different peripheral drivers of MCU’s Code Configuration Tools As told in above sections there are many software stacks used in microcontrollers, so to design and develop the code using these software stack from scratch would be very cumbersome. As we need to include files for every stack and necessary configuration has to be done for building and compiling the code. So Code Configuration Tools are the software tools, which provide GUI based interface and environment to configure the software stack. We just need to select the hardware(microcontroller), what features we need and what all software components and peripheral to be enabled and then click on a button to generate the code. These tools then generate all the base software automatically from startup code to make files for the configured project. The features of CCT includes Graphical User Interface (GUI), tools for configuring peripherals, code generation and project building. In
So hello guys, welcome to series of Microcontroller tutorials. As Microcontrollers are big thing happening across the globe, but to learn about microcontrollers becomes quite challenging as most of the content on web is theoretical based and quite unorganized. Or the content is only roaming around 2-3 microcontrollers (Arduino, ESP or PIC), even though there are number of Microcontrollers of different vendors. Also, framework of Arduino and Arduino IDE hides most of the things that are going inside the microcontrollers. If you guys want to start with microcontroller coding and looking for chronological order then you have come to right place. How to start with Microcontrollers? – gettobyte Hardware Development Kit In Mcrocontrollers – gettobyte Software Development Kit In Microcontrollers – gettobyte Would recommend viewers to read these 3 blogs in order, so as to get understanding on how to get started with any Microcontroller and in what order. In the last blog we get to know a lot about microcontrollers and how to start with them. One of the essential and important things to know before starting with microcontrollers is Hardware Development Kit. So let’s start with it. Objective of this blog Objective of this blog, will be to understand: What is Hardware Development Kit in Embedded (SDK). Different components in Hardware Development Kit in Embedded. Why there is need of Hardware Development Kit in Embedded. What is Hardware Development Kit Hardware Development Kit in embedded is collection of hardware tools to assist developers to design and prototype the products/projects easily on microcontroller and semiconductor chips. These hardware tools majorly include: Microcontroller/SoC Development Boards/Evalution Boards Debuggers/Programmers Breakout Boards Hardware Debugging Tools. Microcontroller/SoC In the last blog, all we talk about is microcontrollers, so refer to this blog to know what microcontrollers are. Microcontroller and SoC word would be used quite inerchangibly throughout this blog and in subsequent blogs too. Difference between SoC and MCU is that. (SoC): SoC is a less well-defined term. A SoC is typically an encapsulation of one or more of CPUs, memory, micro-controllers, DSPs, accelerators, and supporting hardware; however, it does not adhere to any standards regarding its containing circuitry. An SoC is intended for applications with requirements that are too complex for a single MCU to handle. To explore about different microcontrollers best place is semiconductor company websites like and many others: NXP® Semiconductors Official Site | NXP Semiconductors Analog | Embedded processing | Semiconductor company | TI.com Silicon Labs (silabs.com) Nordic Semiconductor | Empowering Wireless Innovation – nordicsemi.com STMicroelectronics: Our technology starts with you and etc Go to products page of these websites and then navigate to microcontroller-microprocessor section. You will find there are so many microcontrollers which have been categorized in terms of Either processor they have (ARM Cortex CPU based, 8 bit CPU based, or some proprietary CPU core) Or Microcontroller family name’s (Like LPC series, S32 Series, MSP430 series, Kinetic series, STM32 series) Application based( Digital signal processing, IoT protocol’s, peripheral and etc) and etc. Microcontrollers/SoC can’t be used directly, for making projects or learning out the things. Microcontrollers comes in different packaging like BGA, DIP, QFN, QFP, SOP, SQP. Every package takes up different amount of space. In these packages MCU pins are very small to use and in some packages of MCU, we cant even properly touch individual pins of the MCU (BGA and QFN). Now to connect some sensors/modules to the MCU, we need to connect them to the pins of the MCU. So, there is need of some hardware circuit by which we can expose all these pins of MCU in a way that they can be used for prototyping and developing the embedded application by connecting different sensor/modules. And thus, here comes the story of development boards. Development /Evalution Boards Development boards in the field of embedded systems refer to pre-built circuit boards designed to use the microcontrollers/SoC’s. These boards typically include a microcontroller/SoC or microprocessor, along with essential components required to use the microcontroller like: Input/Output interfaces (Header pins, LEDs, Push buttons and etc.), Power regulators (For powering the MCU/SoC), and Miscellaneous circuit required for microcontroller functioning (oscillator circuit, pull-up/down resistors, decoupling capacitors and etc.) Debugging and programming feature. They provide a convenient platform for developers to test their code, interface with external devices, and evaluate the performance of their embedded system designs. These development boards are extensively used among the college students, hobbyists for making DIY projects or learn the microcontroller coding by having hands-on over the microcontrollers using these kind of development boards. These development boards are connected to Host Desktop/Laptop through USB cable via Debugger/Programmer to program/debug the microcontrollers. Thus, these development board provide easy way to use microcontrollers/microprocessor/SoC. Now for every microcontroller there is a development board for using it. Development boards are designed either by the semiconductor companies itself for their corresponding MCU’s or by the Third-party vendors, like: Arduino is a development board which has Atmega 328 MCU. Atmega 328 MCU is designed by Microchip Semiconductor company, but Arduino is designed and developed by Third party organization Arduino. BluePill is a development board which has STM32F103 MCU. STM32F103 MCU is designed by STMicroelectronics, but Bluepill is designed and developed by third party vendors. ElecronicsV1 is development board which has S32K144 Automotive MCU. S32K144 is designed by NXP Semiconductors, but ElecronicsV1 is designed and developed by Gettobyte community. S32K312 MCU which is Automotive General Purpose MCU designed by NXP Semiconductors, there is development board designed by NXP Semiconductors itself S32K312EVB-Q172. Another example is NRF52840 SoC for General Purpose IoT applications designed by Nordic Semiconductor, there is development board designed by Nordic Semiconductors itself nRF52840 DK. Another example is of STM32WB55 SoC for Low-Power IoT applications designed by STMicroelectronics, there is development board designed by STMicroelectronics itself that is P-NUCLEO-WB55. Another example is of MSP430 MCU for General pupose embedded applications designed by Texas Instruments, there is development board designed by Texas Instruments itself that is MSP-EXP430G2ET Their is one more SoC of NXP Semiconductors JN5189 IoT SoC. NXP semiconductors design and develop the development board
SPI Peripheral in S32K1 Microcontrollers. How to use SPI peripheral of S32K1 MCU’s?SPI Master and Slave configuration and API’s
S32 Design Studio IDE Softwrae Installation and SDK installation for S32K144 MCU’s
I2C Peripheral in S32K1 Microcontroller. How to use I2C peripheral of S32K1 Microcontrollers
What is Microcontroller Technology??? How to start learning about Microcontrollers technology
LPUART Peripheral in S32K144 MCU || Briefing about LPUART Peripheral in S32K1xx MCU’s
Table of Contents About GPIO Peripheral The pins which can be configured by the software at runtime to perform various functions are called GENERAL-PURPOSE INPUT/OUTPUT (GPIO) pins. With the help of software one can program the GPIO pins mainly as: Digital Output It compares the external voltage signal with a predefined threshold. Digital Input It controls the Voltage of the pin Analog Function It performs ADC (Analog to Digital Conversion) or DAC (Digital to Analog Conversion) Other Functions or Alternate Functions It makes the pin to perform other functions like PWM output, timer-based captures, external interrupts, and various other interfaces like SPI, I2C, UART communications. Before coming to the Schmitt Trigger Understanding, have a quick recap of Pull Up, Pull Down and Open Drain Configurations from MPU6050 Implementation blog Implementation of MPU6050 with STM32 – gettobyte GPIO Input: Schmitt Trigger GPIO Output Speed Slew Rate GPIO Input: Schmitt Trigger A SCHMITT TRIGGER is a device which uses a voltage comparator to convert a noisy or slow signal edge into a clean and desirable edge instantaneously. For a real time system, the external signals do not change instantly, due to slower slew rate which depends on inheritance parasitic capacitance, resistance or an inductor at the input side. As the processor chip has a Schmitt Trigger, it increases the slew rate and increases the noise immunity for the signals which are captured. Let us understand the implementation of the Schmitt Trigger. It consists of a voltage comparator with positive feedback. The output Vout depends between two input voltage V+ and V–. If V+ > V–, Vout is quickly saturated to VSAT, otherwise Vout = 0 For an ideal op-amp, the current flowing through resistor R3 is zero and thus we have Vref = V– The op-amp output Vout has two saturation values, as shown below Vout = VSAT if V– <V+ 0 if V– < V+ However, V+ depends on Vout and Vin· Therefore, Vout depends on both the input Vin and the recent history of Vout· Such an effect is called hysteresis. Using KCL, assuming that the current flow in the non inverting input terminal of op-amp is zero, Vin – V+ /R2 = V+ – Vout / R1 On solving the above equation we will get, Vin = R2Vout + R1Vin / R1 + R2 At the time instant when Vout transits from one saturation value to the other saturation value, we have V+ = Vref Thus, Vref = R2Vout + R1Vin / R1 + R2 Solving further we get, Vin = (1 + R2/ R1)Vref – (R2/R1)Vout As discussed earlier, Vout has only two possible values. If Vout = 0 initially and Vin increases, we can obtain the trigger high threshold VTH at which Vout transits to VSAT: VTH = (1 + R2/R1) Vref – (R2/R1)*0 = (1 + R2/R1)Vref On the other hand, if Vout = VSAT initially and Vin decreases, we can obtain the trigger low threshold VTL at which Vout transits to 0: VTL = (1 + R2/R1) Vref – (R2/R1)VSAT Vout can be determined by comparing it with two thresholds VTH and VTL. When Vin climbs through VTH , Vout is rapidly switched to the upper limit VSAT· Conversely, once Vin falls below VTL, Vout makes a transition to the lower limit. Note that VTH > VTL , i.e., the threshold for switching to high is greater than the threshold of switching to low. A Schmitt trigger when compared, Provide a better boise rejection. Larger threshold for switching high and low for switching. Immune to undesired noise. GPIO Output Speed Slew Rate The SLEW RATE of a GPIO pin is the speed of change of output voltage with respect to unit time. Slew Rate = ΔV/ Δt In simple words, If the GPIO pin changes from LOGIC LEVEL 0 to LOGIC LEVEL 1, the voltage changes from 0V to 5V in just 5µs, then the slew rate is simply 1V/µs. The higher the slew rate, the shorter time the output voltage takes to rise or fall to desired values. Therefore, a higher slew rate allows faster speed at which the processor can toggle the logic level of a GPIO pin. A shorter rise and fall time allows a GPIO pin to change its logic value more rapidly. A high slew rate can result in significant electromagnetic interference (EMI), also known as radio frequency interference (RFI), to nearby electronic circuits. This is due to the large-amplitude and high-frequency harmonics produced by a fast-rising and falling signal, which can cause malfunctions in a victim circuit through radiation, conduction, or induction. To reduce EMI disturbance, a slower slew rate is generally preferred. GPIO IN STM32WB Each GPIO port has 4 32-bit Configuration Registers (GPIOx_MODER, GPIOx_OTYPER, GPIOx_OSPEEDR and GPIOx_PUPDR) 2 32-bit Data Register (GPIOx_IDR and GPIOx_ODR) A 32-bit Set/Reset Register (GPIOx_BSRR) A 32-bit locking Register (GPIOx_LCKR0 and 2 32-bit Alternate Function Select Register (GPIOX_AFHR and GPIOX_AFLR) Main feature sog GPIO are Output states: push-pull or open drain + pull-up/down Speed selection for each I/O Input states: floating, pull-up/down, analog Fast toggle capable of changing every two clock cycles Highly flexible pin multiplexing allows the use of I/O pins as GPIOs or as one of several peripheral functions GPIO Functional Description The port bit of GPIO can be configured by the software depending upon the hardware characteristics in various modes such as: Input floating Input pull-up Input-pull-down Analog Output open-drain with pull-up or pull-down capability Output push-pull with pull-up or pull-down capability Alternate function push-pull with pull-up or pull-down capability Alternate function open-drain with pull-up or pull-down capability Each I/O port bit is freely programmable, however the I/O port registers have to be accessed as 32-bit words, half-words or bytes. The purpose of the GPIOx_BSRR register is to allow atomic read/modify access to any of the GPIOx_ODR registers. In this way, there is no risk of an IRQ occurring between the read and the modify access. The above diagram shows the basic structure of a