I recently purchased a Nano 33 BLE Rev2 to replace a Nano 33 IoT for a BLE IMU project. I found that Nano 33 BLE Rev2 peripheral BLE notification for the standard twenty byte packet to the central android app to be more 50% slower than the Nano 33 IoT. I do understand the BLE Rev2 uses the nRF52840 and the IoT uses the SAMD21 Cortex®-M0+ 32bit low power ARM MCU. I would have expected the nRF52840 to have better performance as it implemented the ARM® Cortex-M4 processor and is clocked faster the SAMD21 Cortex®-M0+ 32bit low power ARM MCU.
I ran the following loop test:
unsigned long timerCounter = 0;
unsigned long lastTimerTime = millis();
float cyclesPerSecond = 1;
void setup() {
// put your setup code here, to run once:
//Initialize serial and wait for port to open:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
timerCounter++;
if (millis() - lastTimerTime > 5000) {
cyclesPerSecond = timerCounter / 5.0;
Serial.println("Cycles per Second: " + String(cyclesPerSecond) );
timerCounter = 0;
lastTimerTime = millis();
}
}
The above code gives 82K Loop cycles/sec on the Nano 33 BLE Rev2 and 766K Loop cycles/sec on the Nano 33 IoT.
Is it expected that the Nano 33 BLE Rev2 is slower for the above loop code? Maybe there is some configuration I didn’t do correctly. Thanks in advance for responses.