<figcaption>RF Ring oscillator with nrf52.</figcaption>
</figure>
<p>This RF ring oscillator runs on the NRF52 BLE SOC using the Adafruit feather development board. The NRF52 has an ARM Cortex M4F running at 64 MHz with built in BLE radio. An arduino sketch for the oscillator is available <ahref='nrf52-rf-ring.ino'>here</a>, or visible below.</p>
NRF_RADIO->SHORTS = 0; //turn off all shortcuts, for debug
//packet
NRF_RADIO->PACKETPTR = (uint32_t)&packet; //set pointer to packet buffer
//start HFCLK
NRF_CLOCK->TASKS_HFCLKSTART = 1;
while(!(NRF_CLOCK->HFCLKSTAT & CLOCK_HFCLKSTAT_STATE_Msk)){} //wait for hfclk to start
delay(10);
send_token(); //send a starting token
while(1){
if ( NRF_RADIO->EVENTS_END ){
NRF_RADIO->EVENTS_END = 0; //clear end event
packet += 1; //increment for fun
send_token();
}
//delay(100);
//Serial.println(packet); //for debug only
}
}
void loop() {}
</code>
</pre>
<p>Note: This test was run on a the Adafruit Feather Dev board, which uses the Raytac MDBT42Q module, incorporating the NRF52. The module retails for $7, the development board retails $24. Other modules are available for $5 from Fanstel.</p>
<figure>
<imgsrc='radio-modes.png'width=80%>
<imgsrc='radio-timing.png'width=60%>
<figcaption>A) NRF52 Radio Modes. B) Timing</figcaption>