Real-Time Multisensor Data Acquisition on STM32F407G Using FreeRTOS
摘要
In modern embedded systems, multisensor data acquisition is widely applied in areas such as environmental monitoring, industrial automation and real-time control. Efficient task scheduling and reliable debugging support are essential to meet the requirements of these domains. This study introduces a multisensor data acquisition framework designed using the STM32F407G microcontroller with FreeRTOS. The framework integrates three sensors, DHT11 to measure humidity and temperature, LDR to measure light intensity, and PIR to detect motion, where each sensor is managed through a separate real-time task. A mutex mechanism is used to regulate access to the UART interface, thereby avoiding conflicts in shared communication resources. System performance was monitored using SEGGER SystemView, which enables a detailed real-time analysis and visualization of task behavior on the ARM Cortex-M4 platform. The results indicate that the adoption of queue-based inter-task communication reduces the sensor logging overhead by approximately 14,000 CPU cycles. The proposed system offers a structured and efficient solution for multitasking in embedded-sensor networks.