Why Does SPI DMA Circular Reception Fail When CRC Is Enabled?

Why Does SPI DMA Circular Reception Fail When CRC Is Enabled?

Someone is using the STM32G4 internal SPI configured as a slave full-duplex mode, using DMA for receiving. When the DMA is configured to CIRCULAR mode, problems occur where data transmission results in CRC verification failures and reception anomalies. If the DMA transfer mode is configured to NORMAL, there are no issues, and the received data … Read more

Can MCU Access Non-Standard SPI Interfaces?

Can MCU Access Non-Standard SPI Interfaces?

Currently, many precision analog-to-digital converters (ADCs) have a Serial Peripheral Interface (SPI) or some form of serial interface to communicate with controllers, including Microcontroller Units (MCUs), DSPs, and FPGAs. The controller writes to or reads from the internal registers of the ADC and reads the conversion codes. The PCB wiring for SPI is simple, and … Read more

Using MDK Built-in Logic Analyzer to Display Arbitrary Waveforms

Using MDK Built-in Logic Analyzer to Display Arbitrary Waveforms

I mentioned in a previous article about the information on outputting waveforms using the MDK built-in logic analyzer. I found that some people are interested in using the MDK built-in logic analyzer to implement waveform output. Below, I will use the STM32F334 DAC module to output an arbitrary waveform and display the waveform using the … Read more

Summary of STM32 Embedded Interview Topics

Summary of STM32 Embedded Interview Topics

Scan to follow "Learn Embedded Together", learn together, grow together. 1. What are the differences between STM32F1 and F4? Different cores: F1 has Cortex-M3 core, F4 has Cortex-M4 core; Different clock frequencies: F1 has a clock frequency of 72MHz, F4 has a clock frequency of 168MHz; Floating-point operations: F1 has no floating-point unit, F4 does; … Read more

Why Are 2 Data Points Lost During SPI Transmission?

Why Are 2 Data Points Lost During SPI Transmission?

Someone used the STM32F4 chip to validate the SPI functionality. When using two on-chip SPI modules for transmission and reception based on interrupts, it was found that there was always a loss of received data, seemingly losing the last 2 data points. The code used the HAL library’s API functions. What could be the reason? … Read more

Principles of Communication Protocol Design for Embedded Devices and PCs

Principles of Communication Protocol Design for Embedded Devices and PCs

Click below【Learn Embedded Together】 to follow, learn together, and grow together Embedded devices need to set parameters during operation, which is often accomplished by a PC. A communication protocol must be designed for both parties, with three representative protocols as follows: From the table above, it can be seen that embedded devices generally have limited … Read more

Communication Protocol Design Principles for Embedded Devices

Communication Protocol Design Principles for Embedded Devices

Embedded devices need to set parameters during operation, which is often accomplished by a PC. A communication protocol must be designed for both parties, with three representative protocols as follows: As can be seen from the table above, embedded devices generally have limited memory and computational performance, so fixed binary is the preferred communication protocol. … Read more

Key Considerations for Embedded Communication Protocols

Key Considerations for Embedded Communication Protocols

Follow+Star Public Account, don’t miss out on exciting content Source | Internet Embedded development often requires communication in various scenarios, making communication protocols essential. The three representative communication protocols are as follows: As can be seen from the table above, embedded devices generally have limited memory and computing performance, so fixed binary is the preferred … Read more

Characteristics of Communication Protocols for Embedded Devices

Characteristics of Communication Protocols for Embedded Devices

Communication protocols designed for embedded devices typically fall into three categories: Considering the limited memory and computing power of embedded devices, fixed binary is the preferred communication protocol. The following analyzes the characteristics that embedded device communication protocols should have. Simplicity Ensuring that the protocol is a simple solution is crucial; complexity often leads to … Read more