Benchmarking IPCF Timing Options M7

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Benchmarking IPCF Timing Options M7

Jump to solution
2,098 Views
kawin
Contributor III

Hi there,

I want to benchmark IPCF shared memory communication and wonder what timing options are available in M7 bare metal application. The M7 firmware will be started via U-Boot which already initializes the clock. Can you give some advice on how to best benchmark something like this in software?

  • What timer drivers API should I be looking into?
  • How to get system tick and system clock freq?
  • I'm following NXP IPCF example for A53 Linux and M7 bare metal app

Thanks

0 Kudos
1 Solution
2,011 Views
bpe
NXP Employee
NXP Employee

What time granularity do you expect? The STM module could provide the shortest
time duration step of about 7.5ns (If the reference
clock of the STM is 133MHz and the module clock divider is 1). In free running
mode, the duration from 0x0000_0000 to 0xFFFF_FFFF will be more than 30s. If
that matches your requirements, I would like to suggest
using any STM available to provide the timing ticks.

To reduce the time consumption of the code, you can simply enable any STM in
free running mode and take that STM counter as timestamp source.
Then both A53 or M7 can read the same counter in any time with the
simplest bare metal code.

Hope this helps,
Platon

 

View solution in original post

0 Kudos
3 Replies
2,080 Views
bpe
NXP Employee
NXP Employee


If you want to measure various routines execution time, the recommended approach
is to use S32 Development Studio Tracing and Analysis tool. This GUI tool utilizes
the processor internal performance counters and other dedicated HW not visible
to the user. See S32 Design Studio Tracing and Analysis User Guide for details.

Best Regards,
Platon

 

 

0 Kudos
2,074 Views
kawin
Contributor III

One of the metrics that I'm interested in is the one-way interrupt latency between Linux A53 app and M7 firmware. This is how I think something like this can be measured:

  1. Output timestamp start before A53 write the first byte
  2. Output timestamp end when the RX interrupt routine of M7 is triggered

Can I get some guidance on the what clock to use to synchronize the time between A53 and M7 applications?

Thank you

0 Kudos
2,012 Views
bpe
NXP Employee
NXP Employee

What time granularity do you expect? The STM module could provide the shortest
time duration step of about 7.5ns (If the reference
clock of the STM is 133MHz and the module clock divider is 1). In free running
mode, the duration from 0x0000_0000 to 0xFFFF_FFFF will be more than 30s. If
that matches your requirements, I would like to suggest
using any STM available to provide the timing ticks.

To reduce the time consumption of the code, you can simply enable any STM in
free running mode and take that STM counter as timestamp source.
Then both A53 or M7 can read the same counter in any time with the
simplest bare metal code.

Hope this helps,
Platon

 

0 Kudos