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
Initialize the LCD segment BSP_LCD_GLASS_Init();
Clear the LCD RAM BSP_LCD_GLASS_Clear();
Write Data in LCD RAM BSP_LCD_GLASS_DisplayChar((uint8_t *)”A”, POINT_ON, DOUBLEPOINT_OFF, 1);
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.
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.
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.
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.
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.
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.
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.
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:
Real-Time These are the system in which the output has to reach the desired set-point within an allocated time.
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:
Standalone mode In standalone mode, the system does all the work independently and doesn’t rely on any other external resources.
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.