A couple of years ago the PVS-Studio analyzer got its first diagnostic rules to check program code compliance with the MISRA C and MISRA C++ standards. We collected feedback and saw that our clients were interested in using the analyzer to check their projects for MISRA compliance. So, we decided to further develop the analyzer in this direction. The article covers the MISRA C/C++ standard and the MISRA Compliance report. It also shows what we already managed to do and what we plan to achieve by the end of the year.
![](http://habrastorage.org/getpro/habr/hub/64f/a1d/c30/64fa1dc30e4a6c3ae14304bca2dac377.png)
Programming microcontrollers *
Learning how to program microcontrollers
High-level pipelining in TL-Verilog, RISC-V from Imagination, formal tools and open-source EDA on ChipEXPO in Moscow
![](https://habrastorage.org/r/w1560/getpro/habr/upload_files/c6f/e3d/686/c6fe3d686d294a446c81cdd207944d0a.png)
This year ChipEXPO conference in Moscow invited several Western speakers to present in English the emerging technologies in high-level HDLs, formal verification, open-source EDA and using industrual RISC-V cores for education. You can join these presentations on September 14-16 for free using this link (you may need to use google translate from Russian to go through the registration) https://eventswallet.com/en/events/282/
The whole program is here
The English-speaking presentations and tutorials include:
UAVCAN HITL UAV Simulator for PX4
![](https://habrastorage.org/r/w780/getpro/habr/upload_files/1bf/769/f23/1bf769f2307a189c26460d70493055bd.jpg)
Hi from RaccoonLab, a team of enthusiasts in field robotics! We want to share our true-HITL UAVCAN-based simulator for PX4.
We believe a unified UAVCAN bus for drone onboard electronics will become a mainstream approach shortly. Our simulator is already based on UAVCAN (in opposition to UART-MAVLINK) and emulates exactly the same messages as real UAVCAN-sensors.
Why do you need the MISRA Compliance report and how to generate one in PVS-Studio?
![](https://habrastorage.org/r/w1560/getpro/habr/upload_files/382/0e3/330/3820e333014229c8234ca3f5219045a2.png)
If you are strongly interested in MISRA and would like to understand whether your project meets one of the MISRA association's standards, there is a solution. It's name is MISRA Compliance. PVS-Studio has recently learned how to generate the MISRA Compliance report. This article describes how you can use this feature. This can make somebody's life better.
System-on-Chip bus: AXI4 simplified and explained
Protocol AXI4 was developed for High-bandwidth and low latency applications. It is designed to allow communication between master and slave devices. Master is typically a DMA or CPU and slaves are DRAM controllers, or other specific protocol controllers: UART, SPI, and others. Sometimes one component can implement multiple instances of this protocol. Usually, a prefix is used to differentiate between multiple AXI4 interfaces.
For example, Ethernet MAC can integrate DMA and slave interface used to command MAC. MAC can accept commands on the slave interface that contain data about the location of the next ethernet packet and MAC can start fetching this packet using the separate master interface instance.
This article was motivated by common design mistakes AXI4 designers make when they are designing their Digital IP. (Looking at you Xilinx)
Doubling effective digitization frequency by multiple pass approach, is it possible?
![](https://habrastorage.org/r/w780/getpro/habr/upload_files/dd3/a9f/d2a/dd3a9fd2adfec0531b15dbcf4c35d731.jpg)
As already described in the previous article, in the process of reworking the DSO138 oscilloscope toy, the idea arose in the DSO303 firmware at some point to try to double the maximum sampling frequency to achieve scanning times of 500 and 200 nanoseconds per cell. In fact, for the STM32F303, the theoretically maximum achievable sampling rate from the point of view of the ADC input, and this is determined by the minimum opening time of the ADC sampling unit, which in our case is 1.5 clock cycles x (1/72 MHz) = 20.8 nanoseconds, is 48 MSPS (millions of counts per second). However, with the parallel operation of 4 ADCs at 6 MHz, it is possible to achieve only 24 MSPS due to the limited speed of the ADC.
Let's imagine that we are considering correctly-periodic signal, which is also constant, i.e. it does not experience fluctuations in frequency and amplitude over time. Is it possible to somehow digitize it not in one, but in several passes, thereby increasing the effective sampling frequency?
DSO138 upgrade
![](https://habrastorage.org/r/w780/getpro/habr/upload_files/663/71e/a4a/66371ea4a3ea2b2b3aa78b2c49ba1e9b.jpg)
On Ali, an interesting toy – an oscilloscope called DSO138 is sold for a very inexpensive price. It has already gained quite a lot of popularity among electronics lovers, but the parameters of this device, alas, allow it to be more or less fully used only for debugging very low-frequency circuits. Actually, it is not positioned as a tool, but rather as a DIY-kit for novice electronics engineers.
This "toy" oscilloscope is assembled on the STM32F103 microcontroller, and with a fairly competent circuit design of the digital part, the presence of a fairly decent 320X240-dot color display, and not the most rotten analog path, everything, alas, is ruined by very weak ADCs on board the 32F103. The claimed band of 200 kHz can be recognized as such only with a very large stretch. Yes, it will show the presence or absence of a signal with such a frequency, but it will not be possible to really look at something beyond this.
At the same time, the 103-series has a slightly more powerful brother - the STM32F303, it is almost completely compatible with the legs, but it is significantly better in terms of the parameters we are interested in, there are 4 ADCs on board with a conversion frequency of 5 MHz (6 MHz with a 10-bit resolution). In this scenario, if you use all 4 ADCs in parallel with a 10-bit resolution, you can get a effective resolution of up to an honest 24 MSPS (millions of samples per second). The microcontroller is also inexpensive; you can easily find it on the same Ali for very reasonable money again. It is clear that the idea to change the microcontroller arose almost immediately after I tried this DSO138.
At the same time, if upgraded the toy can turn out to be a completely full-fledged tool that even professionals, not just novice amateurs, could already use. With these thoughts in mind, I decided to try to do something with a Chinese toy in my free time.
Building an Arduino based RFID Emulator
![](https://habrastorage.org/webt/3l/0d/sg/3l0dsgfav4dq7jpvme_uonxwgus.png)
This project is aimed at creating an experimental device for emulating RFID labels of three widely available components. I simplified the explanation of the process so that it could be easily replicated. I also developed some helpful ideas along the way, including writing a special program for converting a serial number into the transmitted data, which will definitely prove useful.
Passcode Data Protection by Using FPGA and Verilog
![](https://habrastorage.org/r/w1560/webt/ep/px/q4/eppxq4_b9pnlyftw7orbmnqhn0k.png)
There are many situations when you need to protect your data, and different tools can be used to do that. For example, a safe. We develop a passcode data protection mechanism by using an FPGA board and Quartus Prime software. It allows demonstrating the basic concepts of a combination lock such as entering data, setting and checking a passcode, and displaying data.
Configuring FT4232H using the ftdi_eeprom
The FT4232H is USB 2.0 High speed to UART IC converter. The FT4232H has four UART ports and one USB port.
By connecting EEPROM memory to this chip, you can set specific operating modes or change the manufacturer's data.
Let's look at the example and configure FT4232H directly on a system running GNU/Linux. We will do this using the ftdi_eeprom
.
How to make your home ‘smart’ without going crazy
![image](https://habrastorage.org/webt/sb/4c/63/sb4c632opik6l8vpo9uvssc1yza.png)
Smart furniture, which keeps your house in order, is a must for almost any futuristic set. In fact, an auto-regulating climate, automatic lights and voice control over household devices — all this can be done and configured now. But it will take a little experience, basic knowledge of technology and sometimes programming, as well as a whole sea of fantasy. In my case, I did in the way that just fantasy will be enough, but first things first…
About embedded again: searching for bugs in the Embox project
![Рисунок 2](https://import.viva64.com/docx/blog/0731_Embox/image1.png)
Embox is a cross-platform, multi-tasking real-time operating system for embedded systems. It is designed to work with limited computing resources and allows you to run Linux-based applications on microcontrollers without using Linux itself. Certainly, the same as other applications, Embox couldn't escape from bugs. This article is devoted to the analysis of errors found in the code of the Embox project.
Checking the Code of Zephyr Operating System
![PVS-Studio and Zephyr](https://habrastorage.org/getpro/habr/post_images/4ee/aeb/25b/4eeaeb25b1ec54a9016cec031ae97451.png)
Some time ago we announced PVS-Studio's new feature that enabled it to integrate into PlatformIO. Naturally, our team kept in touch with the PlatformIO team while working on that feature, and they suggested that we check the real-time operating system Zephyr to see if we could find any interesting bugs in its code. We thought it was a good idea, and so here's this article about the check results.
PVS-Studio Integration in PlatformIO
![Picture 5](https://habrastorage.org/webt/_z/w-/05/_zw-05-ik4dtu1c2mt-8gp8grfk.png)
Recently, the PlatformIO development environment of embedded systems has supported PVS-Studio. In this article, you'll find out how to check your code with the static analyzer on the example of an open project.
What Is MISRA and how to Cook It
![Рисунок 2](https://habrastorage.org/getpro/habr/post_images/cf9/5bc/021/cf95bc0219fd9e34f03d5cfc316f7e71.png)
Perhaps every microcontroller software developer has heard about special coding standards to help improve the code security and portability. One of such standards is MISRA. In this article, we'll take a closer look at what this standard is, its concept and how to use it in your projects.
On request of Embedded Developers: Detecting Errors in Amazon FreeRTOS
![](https://habrastorage.org/getpro/habr/post_images/cee/9b7/a98/cee9b7a984f45dc365b4baea89adb019.png)
Building a Bare-Metal Application on Intel Cyclone V for Absolute Beginners
You need to have the development board with Intel (Altera) Cyclone V SoC. I used SoCKit board:
![](https://habrastorage.org/webt/x5/tw/rb/x5twrba2tlvz68fuwltzjsak2ds.jpeg)
Using PVS-Studio Static Analyzer in C and C++ Development for Embedded Systems
![](https://habrastorage.org/webt/jc/ko/sf/jckosfvoaqkreh1g-yciaqtz_ik.png)
This article will tell you how to launch analysis of an embedded project and how to work with the analyzer's report. The PVS-Studio analyzer supports a number of compilers for embedded systems. The current version allows checking projects built with one of the following compilers under Window, Linux, and macOS:
NodeMCU simple driver model (SDM) showcase: dynamic user interface
NodeMCU is an interactive firmware, which allows running Lua interpreter on the ESP8266 microcontroller (ESP32 support is in development). Alongside with all the regular hardware interfaces, it has WiFi module and SPIFFS file system.
This article describes the new module for the NodeMCU — sdm. SDM stands for simple driver model and it provides device-driver model abstraction for the system. In the first part of this article we will discuss the model itself and in the second part will be a showcase of dynamically created web user interface using sdm with some commentaries.
Making a DIY text laser projector
![](https://habrastorage.org/webt/dn/9d/2r/dn9d2r-uteclj5p-smec6__dd2s.jpeg)
Authors' contribution
YuriPanchul 2031.2smart_alex 1432.4EasyLy 1279.6MaFrance351 1226.0Indemsys 1201.0aabzel 1117.0iliasam 1090.6dlinyj 741.0GarryC 619.4haqreu 575.0