Location: Home >Posts> Domestic industrial CPU, real-time analysis and test based on Allwinner T507-H development board

Domestic industrial CPU, real-time analysis and test based on Allwinner T507-H development board


Allwinner T5 series is a high-performance quad-core CortexTM–A53 processor for the new generation automotive market. The T5 series meets the automotive AEC-Q100 test requirements. The chip integrates quad-core CortexTM–A53 CPU, G31MP2 GPU, 32-bit DDR3/LPDDR3/DDR4/LRDDR4 DRAM.

Domestic industrial CPU, real-time analysis and test based on Allwinner T507-H development board

The MYC-YT507H core board is developed based on the T507-H processor. It has rich interface resources and a good software development environment. The kernel supports the open source operating system Linux.

In the development stage, it is recommended to cooperate with the evaluation kit MYD-YT507H that comes with the core board to speed up the development. Details of the evaluation kit are available at: http://www.myir-tech.com/product

2.real-time kernel design

Real-time patch we choose RT-Preempt to achieve.

1.1. Porting patches

RT patch official website Download the 4.9.170 corresponding patch from the RT official website



Put the decompressed patch in the linux4.9 directory, and then pack it with the following command patch -p1

Due to the difference in the code, a large number of mismatches will be prompted, resulting in the failure of patching, use the following command to find out the failed file

find ./ -name “*.rej”

Manually check the rej files one by one and modify them one by one


zram driver, the source code in the sdk is referenced from the 5.x version driver, you need to find the RT patch reference around 5.10

In the thread_info.h file, manually change the PREEMPT_LAZY macro to the sequence number and macro name

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 request_percpu_irq, not the regular request_irq or request_thread_irq, and cannot be threaded.

Continue to analyze the crash call stack. The last operation before the crash is cpufreq_cpu_get. By analyzing its 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 called to cause the crash.

By analyzing the cpufreq_acct_update_power function, it is found that the macro definition: CONFIG_CPU_FREQ_TIMES can shield this function, and then not call rt_spin_lock.

After testing, in menuconfig, after shielding CONFIG_CPU_FREQ_TIMES, the system can start to the login link normally.


The mutual exclusion between CPU_FREQ_TIMES and PREEMPT_RT_BASE is set 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

1.2. Other configurations that affect performance

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

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

echo userspace > scaling_governor

cat saling_max_freq > scaling_setspeed

(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

Figure: No-load test

CPU & memory fully loaded

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

increase pressure

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

Figure: Full load test

Data comparison:

Chart: Data Information

4. Product introduction

The MYC-YT507H core board adopts SMD packaging (stamp hole + back pad). There are 4 product models in the standard configuration. They have some differences in storage configuration, temperature, etc., and customers can choose the appropriate model according to their needs.

Figure MYC-YT507H core board

Main parameters of MYC-YT507H

Core board main parameters

4.1. Main parameters of MYD-YT507H peripheral interface resources

Table Development Board Peripheral Interface Resources Main Parameters

The Links:   3HNA004958-001 6AG1124-0GC01-4AX0