Is it possible to get identical (close) trig_count for different devices F303, F415 and L443

I have 3 devices F303, F415 and L443, which give different trig_count when I am executing simpleserial-aes. The binaries that get loaded are almost identical to each other.
From what I have read on the forum, the differences can be attributed to HAL and internal transistor level logic for each device. L443 and F415 both have Cortex-M4, and I am getting a difference of ~500 cycles (triggers) for them.

  1. Can we modify the HAL’s or any other setting, so that the trig_count is close enough for these devices including F303?
  2. Internally the processors have branch prediction, is it also possible to disable branch prediction so that the execution has less variability because of branch prediction? If so can you please let me know, how I can disable it in my runs.
  3. I want to know if the devices do execution in place.

Thanks for your help.

What do you mean by close enough? What are the current differences and what are you looking for? Are you running the same crypto implementation on the targets?

I don’t think you can disable branch prediction on Arm devices. IIRC there’s some other performance enhancers on the F415 that you can turn off. I’d recommend taking a look at the reference manuals for the devices.

Yeah, they do execution in place. In general, small micros like this will load instructions directly from flash.


Thanks for the reply.

  1. Yes I am running the same crypto implementation on each of the devices.
    I am setting CRYPTO_TARGET = “MBEDTLS”. The clock frequency is 7.38MHz, with clkgen_x4 adc_src. With these settings I build simpleserial-aes and program the targets.
    The trig_count for the devices is as follows
    F303 - 5088
    F415 - 5284
    L443 - 4796
    I am trying to make the trig_count, which indirectly is the execution time (I think) identical or close (within 10-20 clock cycles or so) to each other. I want them to finish AES execution close to each other.
    Please let me know if you need more information on this.
  2. I will take a look at the reference manual to see if I can find anything on branch predictions.


  1. I would like to know if there are any suggestions for Turing off other enhancers on 415.
  2. I would like to also know if there is still a way to get the trig_count close for each device. I gave the device details in an earlier post.