We're porting over some software to the Arduino Nano 33 BLE Sense. This board comes with an nRF52840 clocked at a max. of 64MHz. However, the same code runs about 2x slower on this board than on the ST L475VG platform, which also spans a Cortex-M4F (running at 80MHz). This makes me suspect that we're not running the board at the max. frequency (but rather at 16MHz or something). The only place where the main clock is defined seems to be here: https://github.com/arduino/ArduinoCore-nRF528x-mbedos/blob/beac74ca3cd9d07363f66cf9cda6b143e4385cd2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF51/TARGET_MCU_NRF51822_UNIFIED/sdk/nrf_drv_config.h#L60, which should be 64MHz. Both targets are using Mbed OS underneath.
Here's a code sample of a pretty simple matrix multiplication in software. We see similar slowdown when using CMSIS-DSP:
This takes 326ms. on the ST L475, and 2403ms. on the Nano 33 BLE.
Anyone any idea on how we can check the actual frequency without an oscilloscope?
Edit: I managed to speed this up to 786ms. by enabling `-mfpu=fpv4-sp-d16`, setting `-fmloat-abi=hard` (over softfp), and placing and executing the matrix functions in RAM. Still a significant slowdown unfortunately.