• How to add CMSIS DSP Library to STM32 Cube IDE Project for stm32l476vg

    To add CMSIS DSP library in you stm32cube project.

    You can follow the steps written on ST’s website

    Configuring DSP libraries on STM32CubeIDE

    I have also made a video.

    In this video. I have shown steps to add the arm_math.h header file. You need to configure the stm32 cube ide.

  • How to write german umlauts in MS Word

    To write umlauts

    1. Press
      ctrl + shift + :
    2. Release the key
    3. Type the alphabet

    ä – a

    Ä – A

    ü – u

    Ü – U

    To write ess tset ß

    • alt + 0223
    • ß

    Write umlaut using ALT codes

    UmlautAlt + code
    ÜAlt + 0220
    üalt + 0252
    äalt + 0228
    Äalt + 0196
    Öalt + 0214
    öalt + 0246
    ßalt + 0223
  • How to use LCD Driver of STM32L476VGT on STM32L476 Discovery

    To use the internal LCD driver of stm32l476; the best way is to use the LCD driver provided in the BSP. It is located inside the STM32Cube_FW_L4_V1.16.0 repository.

    • Go to the
      ..\STM32Cube\Repository\STM32Cube_FW_L4_V1.16.0\Drivers\BSP\STM32L476G-Discovery
    • Copy the stm32l476g_discovery.c, stm32l476g_discovery.h, stm32l476g_discovery_glass_lcd.c and stm32l476g_discovery_glass_lcd.h
    • Paste the files in your project.
    • Include the header file in your project.
      #include “stm32l476g_discovery_glass_lcd.h”

    After this you need to

    1. Initialize the LCD segment
      BSP_LCD_GLASS_Init();
    2. Clear the LCD RAM
      BSP_LCD_GLASS_Clear();
    3. Write Data in LCD RAM
      BSP_LCD_GLASS_DisplayChar((uint8_t *)”A”, POINT_ON, DOUBLEPOINT_OFF, 1);
  • How to use printf using serial wire debug on STM32L476 Discovery

    We all use printf statements for debugging purposes at some point in time.

    To use print statement. You need to do fuse one solder bridge

    Solder Bridge information from the STM32L476 Discovery Kit User Manual UM1789

    Fuse the solder bridge number SB14.

    Always be careful since the solder bridges are very small.

    After you have done fused the solder bridge. You can configure your project in STM32 Cube IDE.

    Watch the video below for complete instructions.

    A few things must be taken care of before you start debugging:

    • The Core Clock in your debug configuration must be equal to the system core clock.
    • Press the record button in SWV ITM Data Console before you start debugging.
  • How to start a project for STM32L476 Discovery in STM32 Cube IDE

    Download the STM32 Cube IDE from https://www.st.com/en/development-tools/stm32cubeide.html

    Watch this video tutorial.

    Write a program using STM32L476G-DISCO

    Step1: Install STM32 Cube IDE

    Step2: Create a New Workspace
    A workspace is a directory which will contain all your code and library related to your project.

    Step 3: click on “Start new STM32 Project” button

    Step 4: Select your board “stm32l476G-DISCO”

    Step 5: Give your project a name
    Do not change any options

    Step 6: Select “YES” when prompted for “Initialze all peripheral with their default mode”
    It is very important that you select YES other wise it will remove all the associated peripherals and you have to manually add the desired peripherals one by one; which is very difficult for beginners.

    After these steps your project is created and it will open a STM32 CUBEMX inside your IDE.

    Please watch the video. As there are a lots of steps and instruction which are difficult to explain by writing alone. Video will show you a step by step procedure and give you a basic explainition.

    You can now change the option or you can proceed forward and click on generate code. This will create all the required code changes.

    Now you can open you “main.c” file inside your IDE and write code.

  • Overview of STM32L476 Discovery Kit

    This development board from STMicroelectronics has different peripherals such as an LCD screen, MEMS sensor, USB OTG, Microphone and a 16 MegaByte memory.

    It has a cr2032 battery socket on the back. So you can use a 3-volt cr2032 battery to power this board. But for that, you have to change the jumper from 3v3 to batt.

    Here is a video providing overview of the stm32l476 discovery kit.

  • IDE Supporting STM32L476-Discovery

    An IDE combines a range of different tools which are essential for the development of software. Different IDE from different vendors is available.

    Here are the IDE that I have used.

    1. STM CUBE IDE
      website: https://www.st.com/en/development-tools/stm32cubeide.html
      It is distribuited freely by ST. You can use this and it has a good device support and newer devices are quickly added to it. ST uses the eclipse IDE as the base and then they have customized it heavily for the microcontroller development. It also comes with their ST cube MX integrated in it. Which makes development quicker. From the information i have gathered till now it uses gcc as their compiler. Support is available at the forum hosted by ST on thier website.
      They offer support for freeRTOS out of the box.
    2. Keil MDK
      website: https://www2.keil.com/mdk5
      They have a wide support for ARM based devices. You can download the IDE from thier website. It has two version one is the evaluation which limits your code size to 32 Kilo Bytes; but it is good for begineers. The second is the paid option. In both the version all the tools works fine. It is just the code size that puts a limit.
      Keil also host a huge knowledge base on their website. It also has some sample which can be usefull in getting started.
    3. IAR Embedded Workbench for Arm (EWARM)
      website : https://www.iar.com/products/architectures/arm/iar-embedded-workbench-for-arm/
      They are also used by the electronic industry. They also has their own compiler which is written for the speed. They have a standard layout and option. They are user friendly. From the information gathered by me they have tested functions only. So it is very standardised set of tool. They also have put a limit on their evualtion IDE of 32 Kilo Byte Code size.
  • Powering STM32l476-DISCO using CR2032 Battery

    STM32l476-DISCO using CR2032 Battery

    The stm32l476-disco can be powered by a battery. The board has a socket to place the battery on the backside of the board.

    For using the battery you need to do the following steps.

    1. Remove the RST jumper
    2. Remove the jumper marked as CN3
    3. The Jumper JP5 should be set to IDD
    4. The Jumper JP6 should be set to BATT

    The battery-powered operation is useful in low power operations.

    There is a switch to change the power selection from battery to USB. You need to physically change the jumper location to BATT from 3v3.

    The controller gets 3v3 from the st-link section of the board. ST-link gets the power using the USB mini port.

  • STM32L476vg Discovery Kit Images

    These are two images of the development board.

    Almost entirely the board is made using SMD components. There are some through-hole components.

    The back of the development board shows us the different fuses and connections.
    At the back, there is a battery holder which can be powered using cr2032.

    The top half of the board has an st-link debugger.

  • Introduction to Embedded System

    An embedded system is a combination of software and hardware to perform a specific task at a instant of time.

    There are two types of embedded system:

    1. Real-Time
      These are the system in which the output has to reach the desired set-point within an allocated time.
    2. Non Real-Time
      In the system the output doesn’t depend on the input. There is no time window allocation for the performing of task.

    An embedded system can be distributed. A distributed embedded system is the one in which you can externally add or subtract specifics components. Example: consumer PC etc.

    All the principles of control system directly affect the embedded system.

    An Embedded system can be designed in two ways:

    1. Standalone mode
      In standalone mode, the system does all the work independently and doesn’t rely on any other external resources.
    2. Distributed mode
      In distributed mode, the system is a subset and depends on other subsets.

    A processing element can be a self-contained unit or it may be spread across physically. example: AMD Sempron 145 is a self-contained unit whereas relay based processing element is physically spread across space.