• FreeRTOS Design Routine Based on i.MX9352 Development Board M Core

    07/02/2025 at 06:22 0 comments

    In the embedded systems, the application of embedded real-time operating systems (RTOS) is becoming increasingly widespread. Using an RTOS can utilize CPU resources more reasonably and efficiently. As a lightweight and mature real-time operating system kernel, FreeRTOS has complete core functions, including task management, time management (such as delays and timers), synchronization mechanisms (semaphores, mutexes), inter-process communication (message queues), and so on. These features enable it to meet the needs of small and medium-sized embedded systems with relatively limited resources.

    i.MX 9352 is a new generation of lightweight edge AI processor launched by NXP, which integrates 2 x Cortex-A55 cores and 1 x Cortex-M33 real-time core. Its architecture design fully reflects the balance between real-time and complex task processing capabilities. To help developers fully leverage the real-time capabilities of the i.MX 9352 M33 core, the FreeRTOS examples provided in the accompanying M-core SDK package are divided into two categories. One category introduces the features of FreeRTOS system components, such as semaphores, mutexes, and queues. The other category shows how to use peripheral interfaces in FreeRTOS. Examples from each of these two categories are selected for demonstration.

    ▊ Demo platform: Forlinx Embedded OK-MX9352-C Development Board

    Forlinx Embedded OK-MX9352-C Development Board

    1. FreeRTOS-generic

    The sample code of FreeRTOS features supported by the Forlinx Embedded OK-MX9352-C is as follows:

    • freertos_event: Demonstration Routine for Task Event
    • freertos_queue: Demonstration routine for implementing inter-task communication using queue messages
    • freertos_mutex: Routine for using mutexes
    • freertos_swtimer: Usage of software timers and their callbacks.
    • freertos_tickless: Routine for delayed wake-up using LPTMR or wake-up by hardware interrupt.
    • freertos_generic: Demonstration routine for the combined use of tasks, queues, software timers, tick hooks, and semaphores.

    Since the FreeRTOS_generic routine uses many FreeRTOS features, let's focus on analyzing this routine.

    (1)Software implementation

    The content of the example program includes: task creation, queues, software timers, system tick clocks, semaphores, and exception handling. Specifically:

    Task creation:

    The main function creates three tasks: a queue sending task, a queue receiving task, and a semaphore task.

    // Create the queue receiving task
    if (xTaskCreate(prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE + 166, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL) != pdPASS)
    // Create the queue sending task
    if (xTaskCreate(prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE + 166, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL) != pdPASS)
    // Create the semaphore task
    if (xTaskCreate(prvEventSemaphoreTask, "Sem", configMINIMAL_STACK_SIZE + 166, NULL, mainEVENT_SEMAPHORE_TASK_PRIORITY, NULL) != pdPASS)

    Queues:

    The queue sending task blocks for 200ms and then sends data to the queue. The queue receiving task blocks to read from the queue. If the data is read correctly, it prints the current number of received items in the queue.

    // The queue sending task blocks for 200ms and then sends data to the queue static void prvQueueSendTask(void *pvParameters)  {      TickType_t xNextWakeTime;      const uint32_t ulValueToSend = 100UL;      xNextWakeTime = xTaskGetTickCount();      for (;;)      {          // The task blocks until the 200ms delay ends.          vTaskDelayUntil(&xNextWakeTime, mainQUEUE_SEND_PERIOD_MS);          // Send data to the queue. A blocking time of 0 means it will return immediately when the queue is full.          xQueueSend(xQueue, &ulValueToSend, 0);      }  } //The queue receives the task, and the task is blocked to read the queue. If the data is read correctly, the number received by the queue at this time is printed.
    static void prvQueueReceiveTask(void *pvParameters) { uint32_t ulReceivedValue; for (;;) { //The task keeps blocking until data is read from the queue xQueueReceive(xQueue, &ulReceivedValue, portMAX_DELAY); //The queue data is...
    Read more »

  • Intelligent Lawn Mowing Robot Main Control Solution Based on RK3576

    06/27/2025 at 03:02 0 comments

    With the rise of smart outdoor automation, intelligent lawn mowing robots are rapidly replacing traditional gasoline-powered mowers in Europe and America. To meet growing demands for autonomy, precision, and environmental performance, embedded system designers are turning to powerful platforms like the Rockchip RK3576. As a high-performance processor with built-in AI acceleration, the RK3576 offers an ideal main control solution for next-generation smart lawn mowers.

    intelligent lawn mowing robots

    1. RK3576 SoM: A New and More Powerful Engine

    The rising consumer demand for more functions in lawn mowing robots is creating an urgent need in the industry for intelligent and efficient technical solutions. As the core technological carrier of the intelligent wave, the Rockchip RK3576 processor, with its high-performance computing, high computing power, multi-sensor fusion, and low-power design, is expanding the technical boundaries of intelligent lawn mowing robots and driving the products to evolve towards greater precision, autonomy, and environmental friendliness.

    The FET3576-C system on module(SoM) developed by Forlinx Embedded based on the Rockchip RK3576 chip uses advanced 8nm process technology. It integrates a quad-core Cortex-A72 (with a main frequency of 2.3GHz) and a quad-core Cortex-A53 (with a main frequency of 2.2GHz), and is equipped with a Mali-G52 MC3 graphics processing unit (GPU) and a neural network processing unit (NPU) with an independent computing power of 6TOPS, making it a more powerful engine for high-end lawn mowing robots.

    Intelligent Lawn Mowing Robot Main Control Solution Based on RK3576 system on module

    2. Technological Innovation Driven by Powerful Performance

    Using Forlinx Embedded's FET3576-C SoM, this powerful engine, as the main control device for the new-generation lawn mowing robots significantly enhances the functionality and performance. The technological innovation is mainly reflected in the following aspects:

    (1) Core Computing Architecture

    The FET3576-C SoM CPU features four Cortex-A72 cores and four Cortex-A53 cores. The big.LITTLE architecture enables it to support the concurrent execution of multiple tasks such as route planning, image acquisition, and mechanical control.

    (2) AI Computing Acceleration System

    The NPU built into the FET3576-C core board supports INT4/INT8/INT16/FP16/BF16/TF32 operations and multiple deep-learning frameworks like TensorFlow, Caffe, and Pytorch. With a computing power of 6TOPS, it can achieve accurate object recognition and detection, identify various obstacles in complex environments, and optimize lawn mowing route decisions.

    (3) Realization of Intelligent Weeding System

    The FET3576-C SoM constructs a complete functional closed-loop for intelligent mowing robots through diverse bus interfaces. Thanks to the FlexBus parallel bus (with a maximum clock of 100MHz and compatible with 2/4/8/16-bit transmission) and high-speed interfaces such as DSMC, CAN-FD, PCIe2.1, SATA3.0, and USB3.2, it can be flexibly adapted to multi-spectral camera arrays (connected via MIPI-CSI) and various actuators.

    In terms of function realization, the AI vision algorithm uses camera data for accurate real-time obstacle identification; the decision-making layer uses AI models for dynamic path planning; the execution end controls the laser module or robotic arm through CAN/GPIO interfaces for millimeter-level precise operations. In addition, Wi-Fi and Bluetooth support remote setting of virtual boundaries and viewing of work logs via mobile phone apps.

    Intelligent Lawn Mowing Robot Main Control Solution Based on RK3576 system on module

    3. Summary

    Lawn mowing robots are transitioning from traditional tools to intelligent platforms, placing higher demands on the performance, stability, and AI capabilities of the main control system. The FET3576-C SoM, with its high-performance heterogeneous computing, powerful AI inference ability, and comprehensive system expansion interfaces, constructs an intelligent operation closed-loop from “perception-decision-execution”, providing solid technical support for intelligent lawn mowing robots and...

    Read more »

  • How to Perform OTA Upgrade on the OKMX8MP-C Platform Based on Android 11 System

    06/25/2025 at 02:27 0 comments

    The OTA (Over-The-Air Technology) upgrade system is a technical architecture that enables remote firmware updates for devices via wireless networks. It is mainly composed of a Bootloader program, a firmware transmission module, and a version management module. This system divides the device's storage space into a Bootloader area, an application area, and a download area to achieve the safe replacement of old and new firmware. It supports functions such as resume from breakpoint, encryption verification, and version rollback. Widely used in fields such as smartphones, IoT devices, and automotive electronics, it allows devices to complete function updates and security patch deployments without physical connections. This article describes the specific implementation method of using the OTA upgrade system on the OKMX8MP-Android 11 system.

    Build the OTA upgrade package

    1. Build a complete update package

    Note: The following operations are based on the initial source code, that is, you start using the first version of the OTA function source code.

    1.1 Enter the corresponding path of the source code:

    forlinx@ubuntu:~$ cd imx8mp/OK8MP-android-source/
    forlinx@ubuntu:~/imx8mp/OK8MP-android-source$

    1.2 Configure environment

    forlinx@ubuntu:~/imx8mp/OK8MP-android-source$ source env.sh
    forlinx@ubuntu:~/imx8mp/OK8MP-android-source$ source build/envsetup.sh
    forlinx@ubuntu:~/imx8mp/OK8MP-android-source$ lunch evk_8mp-userdebug
    ============================================
    PLATFORM_VERSION_CODENAME=REL
    PLATFORM_VERSION=11
    TARGET_PRODUCT=evk_8mp
    TARGET_BUILD_VARIANT=userdebug
    TARGET_BUILD_TYPE=release
    TARGET_ARCH=arm64
    TARGET_ARCH_VARIANT=armv8-a
    TARGET_CPU_VARIANT=cortex-a53
    TARGET_2ND_ARCH=arm
    TARGET_2ND_ARCH_VARIANT=armv7-a-neon
    TARGET_2ND_CPU_VARIANT=cortex-a9
    HOST_ARCH=x86_64
    HOST_2ND_ARCH=x86
    HOST_OS=linux
    HOST_OS_EXTRA=Linux-5.4.0-150-generic-x86_64-Ubuntu-18.04.4-LTS
    HOST_CROSS_OS=windows
    HOST_CROSS_ARCH=x86
    HOST_CROSS_2ND_ARCH=x86_64
    HOST_BUILD_TYPE=release
    BUILD_ID=RQ1A.201205.003
    OUT_DIR=out
    PRODUCT_SOONG_NAMESPACES=device/generic/goldfish device/generic/goldfish-opengl external/mesa3d vendor/nxp-opensource/imx/power hardware/google/pixel vendor/partner_gms hardware/google/camera vendor/nxp-opensource/imx/camera
    ============================================

    1.3 Start compilation:

    forlinx@ubuntu:~/imx8mp/OK8MP-android-source$ ./imx-make.sh kernel -j4
    make: Entering directory '/home/forlinx/imx8mp/R3_6.28/OK8MP-android-source'
    /home/forlinx/imx8mp/R3_6.28/OK8MP-android-source/device/nxp/common/build/uboot.mk:74: *** shell env AARCH64_GCC_CROSS_COMPILE is not set.  Stop.
    make: Leaving directory '/home/forlinx/imx8mp/R3_6.28/OK8MP-android-source'
    forlinx@ubuntu:~/imx8mp/OK8MP-android-source$ make otapackage -j4
    ============================================
    PLATFORM_VERSION_CODENAME=REL
    PLATFORM_VERSION=11
    TARGET_PRODUCT=evk_8mp
    TARGET_BUILD_VARIANT=userdebug
    TARGET_BUILD_TYPE=release
    TARGET_ARCH=arm64
    TARGET_ARCH_VARIANT=armv8-a
    TARGET_CPU_VARIANT=cortex-a53
    TARGET_2ND_ARCH=arm
    TARGET_2ND_ARCH_VARIANT=armv7-a-neon
    TARGET_2ND_CPU_VARIANT=cortex-a9
    HOST_ARCH=x86_64
    HOST_2ND_ARCH=x86
    HOST_OS=linux
    HOST_OS_EXTRA=Linux-5.4.0-150-generic-x86_64-Ubuntu-18.04.4-LTS
    HOST_CROSS_OS=windows
    HOST_CROSS_ARCH=x86
    HOST_CROSS_2ND_ARCH=x86_64
    HOST_BUILD_TYPE=release
    BUILD_ID=RQ1A.201205.003
    OUT_DIR=out
    PRODUCT_SOONG_NAMESPACES=device/generic/goldfish device/generic/goldfish-opengl external/mesa3d vendor/nxp-opensource/imx/power hardware/google/pixel vendor/partner_gms hardware/google/camera vendor/nxp-opensource/imx/camera
    ============================================
    [……]
    #### build completed successfully (13:07 (mm:ss)) ####

    After compilation, the "evk _ 8mp-ota-" eng. Forlinx. zip "will be generated in the" out/target/product/evk _ 8mp/ "path, which is the compressed package required for OTA full upgrade.

    forlinx@ubuntu:~/imx8mp/OK8MP-android-source$ cd out/target/product/evk_8mp/
    forlinx@ubuntu:~/imx8mp/OK8MP-android-source/out/target/product/evk_8mp$...
    Read more »