Hello,

I am using the NXP MBDT(Matalb 2017b, Toolboxversion: 4.1.0, S32K144EVB-Q100) and tried to use the Profiler Function. Attached you can find my simulink model. In that model I tried to test the Profiler Function by implementing a for-loop and measured an execution time of 3319 bus clock ticks. Then I copied the Matlab Function and expected an execution time which is twice as high. But then the FreeMASTER wasn't able to show the variable anymore it just appeared a question mark in the Variable Watch. Therefore I sent the execution time as a CAN-message using the FCAN-Send block. I measured an execution time of 187012 bus clock ticks. How is that possible? I expected a value between 6000 and 7000. Why did the FreeMASTER brake up I didn't change the configuration. Since I am already asking is it correct that the bus clock has in my model a frequency of 40MHz?

Any help on this issue would be highly appreciated!

Thanks in advance!

To make an update here - following up the discussion in this thread MBDT blocks for measuring Idle Time or ProcessorLoad , I realized I have made some mistakes in the answer i previously gave - to correct them, we have the following:

To get the execution time, you should get the number returned by the profiler block (that has frequency of 20MHz) and divide it to this exact frequency to get the result expressed into seconds.

You can also convert from profiler ticks to core ticks by multiplying this number by 4.

The period will remain the same, but now you’ll have the following:

As you can see, as both the nominator and the denominator have been multiplied by the same constant, if you simplify this, you’ll end up with the first formula.

Kind regards,

Razvan.