This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Direct use of 2.4 GHz radio

I have done a number of BLE projects using this chip. I am exploring two potential applications which would use the 2.4 GHz radio, transmit only, in a non-standard way. I can't seem to get it to come on, probably missing some very simple step. I have built an application using the BLE to UART example, but cut off the code before it enables the softdevice. My test code looks like this, called in an infinite loop:

void SendPacket (void)
{
static unsigned char Buf [255];
int i;
for (i = 0; i < sizeof Buf; ++i) Buf [i] = 0x55;
for (i = 1000; i; --i)
   {
   printf ("%c", '0' + NRF_RADIO -> STATE);
   if (NRF_RADIO -> EVENTS_READY)
      break;
   }
//NRF_RADIO -> TASKS_DISABLE = 1;
NRF_RADIO -> PACKETPTR = (unsigned long) Buf;
NRF_RADIO -> FREQUENCY = 80;
NRF_RADIO -> TXPOWER = 4;
NRF_RADIO -> MODE = 4;
NRF_RADIO -> PCNF0 = 0;
NRF_RADIO -> PCNF1 = 0x0002FFFF;
NRF_RADIO -> SHORTS = 0x00000007;
NRF_RADIO -> TASKS_TXEN = 1;
//for (i = 100; i; --i);
//NRF_RADIO -> TASKS_START = 1;
}

Parents Reply Children
No Data
Related