This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to set RF modulation type?

Hi. I'm using nRF51822AC, S130. I made source code for RF test as below.

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);
NRF_RADIO->FREQUENCY  = 2;
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;


while(1)
{
	__WFI();
	;
}

How can i change Modulation type(Modulation as GFSK or not)?

I need your help.

  • The radio only support GFSK modulation, and only the following four variants:

    • 1 Mbit/s Nordic proprietary radio mode
    • 2 Mbit/s Nordic proprietary radio mode
    • 250 kbit/s Nordic proprietary radio mode (deprecated, but working)
    • 1 Mbit/s Bluetooth Low Energy

    The difference between the 1 Mbit proprietary and 1 Mbit BLE mode is mainly that the modulation index is different.

  • What if I don't want any Modulation, how can i do?

  • You can output a carrier wave. This is done for example in the radio test example in the SDK. This function is used to configure the radio for carrier output in the example:

    void radio_tx_carrier(uint8_t txpower, uint8_t mode, uint8_t channel)
    {
        radio_disable();
        NRF_RADIO->SHORTS     = RADIO_SHORTS_READY_START_Msk;
        NRF_RADIO->TXPOWER    = (txpower << RADIO_TXPOWER_TXPOWER_Pos);    
        NRF_RADIO->MODE       = (mode << RADIO_MODE_MODE_Pos);
        NRF_RADIO->FREQUENCY  = channel;
    #ifdef NRF51
        NRF_RADIO->TEST       = (RADIO_TEST_CONST_CARRIER_Enabled << RADIO_TEST_CONST_CARRIER_Pos) \
                                | (RADIO_TEST_PLL_LOCK_Enabled << RADIO_TEST_PLL_LOCK_Pos);
    #endif
        NRF_RADIO->TASKS_TXEN = 1;
    }
    
  • Thank you very much for your help. I already got my source code from "radio test" example source code. What i really want to know is "How can I make it non-modulation mode?" or "Which #define do I choose for non-modulation mode?". NRF_RADIO->MODE = ??? NRF_RADIO->TEST = ???

    I need your help.

  • There is no specific "non-modulation" mode, only the 4 modes listed in my answer. Constant carrier is enabled by setting the CONSTCARRIER field of the TEST register, as you do.

Related