STM32 timer & PWM application programming

Preface Preface to the experiment: This experiment aims to gain an in-depth understanding of the working principle of the STM32 timer and master the method of using the timer to generate pulse width modulation (PWM) signals. The STM32 timer is a very important peripheral that can be used to implement functions such as timing, counting, […]

SpringMVC–@RequestMapping annotation

@RequestMapping annotation The function of @RequestMapping annotation The location of the @RequestMapping annotation @RequestMapping annotated properties 1. value attribute 2. method attribute 3. params attribute (understand) Replenish @RequestParam @RequestHeader @RequestBody @RequestBody gets request parameters in json format @ResponseBody @RestController annotation Function of @RequestMapping annotation The function of the @RequestMapping annotation is to associate the request […]

Understanding LSTM in pytorch

LSTM in pytroch LSTM function in pytorch Detailed explanation of LSTM parameters in pytorch The following are the parameters input_size input node dimension hidden_size number of hidden nodes num_layers number of layers, The shape requirement for input x is x: [seq_length, batch_size, input_size]. To understand these three parameters, you can refer to using “animations” and […]

STM32F407-Discovery’s hardware FPU

Table of Contents 1. Introduction to FPU of STM32F407 2. Configuration 3. Comparative testing 3.1 Example 1 3.2 Example 2 4. Summary This article is based on the STM32 HAL library version: STM32Cube_FW_F4_V1.27.0 1. Introduction to FPU of STM32F407 FPU: Float Point Unit, which is the floating point operation unit. If a fixed-point CPU (CPU […]

stm32f103+HC-SR04+ssd1306 realizes ultrasonic ranging

The homepage of Akinayama coder oi retired player, dabbled in Java, big data, microcontrollers, and IoT, loves technology, technology is guilt-free Welcome to followLikeCollectLeave a message Get the source code and add WX Directory Preface HC-SR04 explanation code programming at last Foreword If you often make some embedded devices, you should be familiar with HC-SR04, […]

STM32 manually transplants HAL firmware library

1. Three development methods of STM32 The essence of microcontroller development is the operation of registers, and the firmware library is a further encapsulation of registers. Direct register development: The execution efficiency is the highest, but the development is difficult and inconvenient for transplantation. You need to consult the data manual frequently. Standard peripheral library […]

Based on stm32f103c8t6, HAL library timer control light on and off &&PWM to realize breathing light

1. Basic knowledge of timers Timer classification 1. Basic timer The basic timer is a simple timer that is usually used to generate precise time delays. It has a single 16-bit counter that can achieve different counting speeds by setting the prescaler coefficient. Basic timers are usually used for simple scheduled tasks. 2. Universal timer […]

Project practice: component scanning (5) – parse methods with GetMapping or PostMapping and finally encapsulate them into ControllerDefinition

1. ControllerDefinition package com.csdn.mymvc.core; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; //Suppose there is a uri:/fruit/index @Data @NoArgsConstructor @AllArgsConstructor public class ControllerDefinition { private String requestMapping; private Object controllerBean; private Map<String, Method> methodMappingMap = new HashMap<>(); } 2. ComponentScan package com.csdn.mymvc.core; import com.csdn.mymvc.annotation.*; import java.io.File; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import […]

[STM32 Development] | INA219 collects voltage and current values

Directory Preface 1 Schematic 2 IIC address description 3 Register address description 4 Configuration before starting work 5 program code 1) Driver 2)Header file 3) Test code Foreword The INA219 is a shunt and power monitor with an I2C or SMBUS compatible interface. The device monitors the shunt voltage drop and the bus supply voltage, […]