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

nrf52833's BLE/RF mouse in EMC certification

Hi,All:

  As the topic,How to set the BLE in a fixed frequency and carrier test? and  modulation test?

Parents Reply Children
  • Hi,Simonr:

          Thank you for your reply! Now what is amasing is how to find the helper document expaining for the function  followed:

    void radio_tx_carrier_test(unsigned char freq_ch)
    {
    NRF_RADIO->TASKS_TXEN = 0;
    NRF_POWER->DCDCEN = 0;

    NRF_RNG->TASKS_START = 1;

    // Start 16 MHz crystal oscillator
    NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
    NRF_CLOCK->TASKS_HFCLKSTART = 1;

    // Wait for the external oscillator to start up
    while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0)
    {
    // Do nothing.
    }

    NRF_RADIO->SHORTS = 0;
    NRF_RADIO->EVENTS_DISABLED = 0;
    //NRF_RADIO->TEST = 0;
    NRF_RADIO->TASKS_DISABLE = 1;
    while (NRF_RADIO->EVENTS_DISABLED == 0)
    {
    // Do nothing.
    }
    NRF_RADIO->EVENTS_DISABLED = 0;

    NRF_RADIO->SHORTS = RADIO_SHORTS_READY_START_Msk;
    NRF_RADIO->TXPOWER = (4 << RADIO_TXPOWER_TXPOWER_Pos);
    NRF_RADIO->MODE = (RADIO_MODE_MODE_Nrf_2Mbit << RADIO_MODE_MODE_Pos);
    if(freq_ch==0) NRF_RADIO->FREQUENCY = 0;
    else if(freq_ch==1) NRF_RADIO->FREQUENCY = 40;
    else if(freq_ch==2) NRF_RADIO->FREQUENCY = 79;
    //NRF_RADIO->TEST = (RADIO_TEST_CONSTCARRIER_Enabled << RADIO_TEST_CONSTCARRIER_Pos) \
    // | (RADIO_TEST_PLLLOCK_Enabled << RADIO_TEST_PLLLOCK_Pos);

    NRF_RADIO->TASKS_TXEN = 1;
    NRF_POWER->DCDCEN = 1;
    }

    and how to explain the all the staments?

     

Related