This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5728: M4 runs slower when Linux is used on A15

Part Number: AM5728
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Linux

Hi,

I have developed a SPI driver for on the M4 or IPU core.   I'm seeing slower performance on the code on the M4 when linux is used.

It may be not be Linux, but some project configuration setting, or configuration which is causing the slow down.

The code performs consecutive SPI writes using the call  

retVal = SPI_transfer(handle, &transaction);

The call is configured as a blocking call.

When it is call consecutively, the time between transactions or the time between enabling of chip select is about 5-10us.

I loaded this code into the M4 core using code composer bypassing Linux.

I have adapted the same application to work with Linux/IPC and have used the user guide here:  http://processors.wiki.ti.com/index.php/Linux_IPC_on_AM57xx

This M4  application is started by using the remoteproc mechanism through Linux.

When this application runs the time between transactions or the time between enabling of chip select i is about 30us which is much longer than the standalone M4 application timing.

The SPI clock is the same speed in both cases (1MHz).

What could cause this slowdown?  I verified the config file both have 

var Cache = xdc.useModule('ti.sysbios.hal.unicache.Cache');
Cache.enableCache = true;

Taking out the IPC code doesn't make a difference in the timing.

I also ran a benchmark test that toggled I/O

while(1)

{

GPIO_write(RESET, GPIO_PIN_VAL_LOW);

GPIO_write(RESET, GPIO_PIN_VAL_HIGH);

}

For the standalone M4, the period to toggle was 3.0us

For the M4+Linux verison, the period to toggle was 4.5us, which is slower.

Do you have any suggestions for settings to verify?

Thanks,

Christine