Hi,
I own a Redbearlab BLE Nano with a nrf51822.
I want to use it to drive some WS2812 rgb LED (neopixels), using precised timings for bit-banging.
Before driving the LED, I wanted to know what the execution speed of a single I/O toggle instruction. I used this code, and measured the output through a logic analyzer :
while(1) {
NRF_GPIO->OUTSET = (1UL << 8);
NRF_GPIO->OUTCLR = (1UL << 8);
}
Compiling from a barebone Eclipse project using the nrf5 SDK v11.0.0 (and SoftDevice 130 although I am not using it in my program), I get a square signal with a high duration of about 500ns.
When I run the same code in the mbed online compiler, I obtain a high duration of about 125ns.
Looking at the system files, both seem to use a SYSTEM_CLOCK of 16000000UL (16MHz). Is there any PLL or anything that I have missed that would allow me to get that 4 times speed increase without using mbed ?
Regards