• MPU: Hongmeng light kernel task stack overflow prosecutor


    Summary:MPU (memory protection unit) maps memory into a series of memory areas, and defines the dimensions, size, access rights and memory familiarity information of these memory areas. This article is shared from Huawei cloud community《Hongmeng light kernel M-core source code analysis series 16 MPU memory protection unit》, author: zhushy. MPU (memory protection unit) maps memory […]

  • STM32 GPIO details


    The following will explain the GPIO function according to the GPIO block diagram in the stm32f207 reference hand. 01. I / O interface circuit The I / O circuit block diagram with FT shows that 5V voltage can be tolerated 1.1. Common input In the normal input mode, there are three modes with pull-up and […]

  • Three different GPIO drivers of stm32


    1. Library function version The most commonly used version uses the st standard peripheral library void Led_ Key_ Init(void) Open source code: https://github.com/strongercjd/STM32F207VCT6/tree/master/06-GPIO-Input-Output 2. Register version The register version actually copies the st standard peripheral library, which can simplify some operations /********Use register — start********/BSRR = TP_ PIN;// Write 1 Open source code: https://github.com/strongercjd/STM32F207VCT6/tree/master/06-GPIO-Input-Output 3-bit […]

  • STM32 interrupt details


    Interrupt plays a very important role in MCU. The code is executed from top to bottom by default. In case of conditions or other statements, it will jump to the specified place. In the process of single chip microcomputer executing code, it is inevitable that there will be some emergencies to deal with, which will […]

  • Why is this code not CPU friendly


    Problem origin The problem comes from watching the BiliBili video again, (address)https://www.bilibili.com/video/BV12p4y1W7Dz), I found that a CPU problem had never been considered, so I became interested. The specific problem is as follows: The following two codes fnc1 and fnc2 (simplified here and the effect is the same), which section is faster to execute: const N […]

  • Swift bottom layer exploration (III): pointer


    IOS memory partition image.png Stack The stack area is to store the current local variables and the context during the operation of the function. func test() { var age: Int = 10 print(age) } test() (lldb) po withUnsafePointer(to: &age){print($0)} 0x00007ffeefbff3d8 0 elements (lldb) cat address 0x00007ffeefbff3d8 &0x00007ffeefbff3d8, stack address (SP: 0x7ffeefbff3b0 FP: 0x7ffeefbff3e0) SwiftPointer.test() -> […]

  • Arm assembly Foundation (IOS reverse)


    Arm assembly Foundation When reversing a function, you often need to analyze a large number of assembly code. In IOS reverse, arm assembly is a language you must master. This paper summarizes the basic knowledge of arm assembly. If you want to know more, please refer to the little yellow book IOS reverse engineering or […]

  • Thinking about the conclusion of the article [understanding volatile keyword] by the boss of fine code farmers and looking for the truth


    1: Background 1. Tell a story Yesterday, in the front page of the editor in the park, I saw an article written by the boss of fine code farmers, entitled:[C #. Net addendum] 10: understanding volatile keyword (https://www.cnblogs.com/willick/p/13889006.html)In the multithreaded environment, a bug that does not appear in debug but appears in release. The original […]

  • 2020 diamond C + + C learning notes (1) erudite Valley


    1. C Language Overview   1.1 what is C language When you mention the word language, you will naturally think of natural languages such as English and Chinese, because it is an indispensable tool for people to exchange information. Today, computers are all over every corner of our life. In addition to the communication between […]

  • STM32 flash explanation


    This article will explain the internal flash programming of stm32f207 according to the official flash programming manual of St, Document No.: pm0059. 01. General Flash here refers to the flash integrated in stm32f207 Flash memory has the following characteristics Maximum 1m byte capacity 128 bit, i.e. 16 byte wide data reading Byte, halfword, word and […]

  • STM32 DMA details


    This article is translated and sorted out according to the user manual of stm32f207 1. Overview DMA (direct memory access) direct memory access is used for high-speed data transmission between memory and memory or between memory and peripherals. Data transmission can move quickly without CPU intervention, which can maintain CPU resources to deal with other […]

  • STM32 watchdog details


    1、IWDG 1.1 introduction to independent watchdog Iwdg (independent watchdog) can be used to detect and solve faults caused by software errors. When the counter reaches a given timeout value, it will trigger an interrupt or generate system reset The independent watchdog clock is its dedicated low-speed clock (LSI), so it can keep working in time […]