Events
Trade Shows
Seminars
Product Updates
 
          Home > News Center > Product Updates
 

Real-time Analysis and Test on MYIR’s Allwinner T507-H based Development Board

 
2023-2-16   17:49:18     Click: 831
 



Allwinner T5 series is a high-performance quad-core Cortex - A53 platform SoC for the new generation of automotive markets. T5 series is qualified to Automotive AEC-Q100 testing. The chip family integrates Cortex-A53 quad-core CPU, G31 MP2 GPU and 32 bit DDR3/LPDDR3/DDR4/LPDDR4 DRAM.

MYIR’s MYD-YT507H development board is using the MYC-YT507H CPU Module as controller board which is based on Allwinner T507-H industrial processor. The board has rich peripheral resources and supports the open source Linux operating system. It provides a complete platform for customers evaluation and prototype purpose, thus to help customers accelerate their development.

MYD-YT507H Development Board


N
ow, we will introduce the real-time kernel design.

We choose RT-Preempt to implement the real-time patch.

1. Porting patch
Please download the corresponding patch for kernel 4.9.170 from the RT official website.

https://wiki.linuxfoundation.org/realtime/start

https://cdn.kernel.org/pub/linux/kernel/projects/rt/4.9/older/

Place the unzipped patch in the linux4.9 directory, and then use the following command to pack it:
patch - p1<./patch-4.9.170-rt129.patch

Due to code differences, a large number of mismatches will be prompted. If the patch fails to be inserted, use the following command to find the failed file.
find ./ -name "*.rej"

Check the rej file manually one by one and modify one by one.

Difficulties:

zram driver: The source code in the sdk is using from the 5.x version driver. You need to find RT patches of 5.10 version or so for reference.

Change the sequence number and macro name of in the thread_info.h file.

Problem 1: Calling the preemption API (rt_spin_lock, or mutex) in the interrupt context causes a sched exception.

Analysis and solution:

This interrupt is the core timer service of the system and is very important. It registers the interrupt isr through the request_percpu_irq, not the regular request_irq or request_thread_irq, which cannot be threaded.

Continue to analyze the crashed call stack. The last operation before the crash is cpufreq_cpu_get. By analyzing the source code, it is basically found that cpufreq_acct_update_power is called in the __account_system_time function, and the rt_spin_lock function is also called to cause the crash.

By analyzing cpufreq_ acct_ update_ Power function, we can find the function can be shielded through the macro definition CONFIG_ CPU_ FREQ_ TIMES, so that no need to call rt_ spin_ lock.

After testing, in menuconfig, after CONFIG_CPU_FREQ_TIMES is shielded, the system can boot to login normally.

Solution:

Set the mutex between PREEMPT_RT_BASE and CPU_FREQ_TIMES in drivers/cpufreq/Kconfig

Open the RT real-time test tool for testing

Open the relevant tests under buildroot, open the rt-tests tool according to the description below, and open the test tool test steps.


2. Other configurations affecting performance

Disable CPU Freq automatic frequency adjustment, and set the main frequency to be the highest frequency:

cd /sys/devices/system/cpu/cpufreq/policy0

echo userspace > scaling_governor

cat saling_max_freq > scaling_setspeed

(Please note that if the cpufreq frequency modulation function is not disabled, the system will generate a huge occasional delay due to dynamic frequency modulation.)

3. Real-time test

no-load test
cyclictest -p 99 -t 1 -d 100 -i 1000 -D 24h -m -a -n


CPU & Memory fully loaded
cyclictest -p 99 -t 1 -d 100 -i 1000 -D 24h -m -a -n


I
ncrease pressure

stress-ng --cpu 4 --cpu-method all --io 4 --vm 50 -d 5 --fork 4 --timeout 36000s


Full load test

Data Comparison

Item

MYD-YT507H

Test time

120min

Command

cyclictest &stress-ng

No load

Average 8us

Max 24us

full load

Average 13us

Max 136us

Data Information


Product Introduction

The MYC-YT507H CPU Module adopts SMD packaging (Castellated-Hole + back pad) which can help your design save space and cost. There are two standard configurations which are different in LPDDR4 memory and working temperature. Customers can choose according to their needs. Customization can be also be provided for volume demand.


MYC-YT507H CPU Module (delivered with shielding cover by default)


Main Features of MYC-YT507H CPU Module

Features

Description

Processor

Allwinner T507-H

ARM Cores

Quad-core ARM Cortex-A53

LPDDR4

1GB/2GB

eMMC

8GB

Dimensions

43 x 45 x 3.5 mm (with shielding framework)

Interface

1.0mm pitch 222-pin Castellated-Hole Expansion Interface

PCB specification

10-layer PCB design, Immersion Gold

OS

Linux 4.9

Main Features of MYD-YT507H Development Board

Features

Description

SYSTEM

POWER

12V DC JACK

KEY

1 x Reset, 1 x FEL, 1 x ON/OFF

SWITCH

1 x Power switch

BOOT SET

1 x Dial switch

SD

1 x Micro SD card slot

Communication
Interface

WIFI/BT

1 x 2.54mm 2*10-pin expansion header (J26)

4G

1 x USB based Mini-PCIe interface
1 x SIM card slot

Ethernet

1 x 10/100/1000 Mbps Ethernet interface (RJ45, ENET1)
1 x 10/100 Mbps Ethernet interface (RJ45, ENET2)

USB

2 x USB 2.0 HOST interfaces
1 x USB 2.0 OTG interface (Type-C)

UART

1 x Debug UART (TTL, USB Type-C connector)
2 x TTL serial ports (UART2, UART5)

Multimedia
Interface

DISPLAY

1 x HDMI 2.0a interface
2 x Single-channel LVDS Display interface (LVDS0 & LVDS1)
1 x Dual-channel LVDS Display interface (J14)
1 x TV CVBS Display interface

CAMERA

1 x MIPI-CSI camera interface
1 x DVP camera interface

AUDIO

1 x 3.5mm Audio output interface
1 x SPDIF Audio output interface
1 x Speaker interface

Extension
Interface

Expansion IO

1 x 2.54mm 2 x 20-pin male expansion header
(J25, GPIO/TWI/UART)

MYD-YT507H Development Board Top-view (delivered with shieldinig cover by default)

MYD-YT507H Development Board Bottom-view



 
Prev:  BMS Solution based on MYIR’s STM32MP1 CPU Module Next:  Build Powerful OpenWRT Soft Router - NXP LS1028A based MYD-J1028X Board