This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2538: How to enable RF-Test mode?

Part Number: CC2538


Hello,

in order to measure certain characteristics of the chip I need to enable the RF-Test mode via ZNP serial command by the host. As far as I understood what I need to do is:

Write in the NV_ITEM 0x0F07 4 bytes of parameters (mode, channel, power, test tone) and then do a soft reset. The device should now be in RF-Test mode as specified until a hard reset. But for some reason this doesnt seem to happen?

So how do I enable the RF-Test mode for the CC2538 ZNP firmware?

regards,

Thomas

  • Hi Thomas,

    You could try debugging your ZNP device by putting a breakpoint in znpTestRF() in znp_soc.c. This function is executed in the main function before OSAL is even kicked off, so it should be executed once after each device reset. Also what values are you using for your test parameters?
  • Hi,

    while checking the possible reasons why the test mode doesn't seem to work properly on my CC2538 I came across the fact that in the ZMain.c for the CC2530ZNP contains the following lines:

      // Initialize NV System
      osal_nv_init( NULL );
    
      // Initialize and check the ZNP RF Test Mode NV items.
      znpTestRF();
    
      // Initialize the MAC
      ZMacInit();

    Where the ZMain.c for the CC2538ZNP only contains this lines:

      /* Initialize NV System */
      osal_nv_init( NULL );
    
      /* Initialize the MAC */
      ZMacInit();

    This looks like thats the reason why the content of the NV_ITEMID 0x0F07 seems to be ignored by CC2538 devices. I added the znpTestRF() call and the needed include (znp_app.h) to match the main method of the CC2530ZNP. What im seeing now after writing to the NV_ITEMID 0x0F07 and a soft reset is that the device stops to accept any of the serial commands until I do a hard reset. I suspect that this is the intended behavior of the rf test mode? When trying to read the contents of the NV_ITEM after the hard reset its 0x00 on all bytes which also seems to be the desired behavior. 

    Can someone confirm that this really activates the test mode?

    For now the parameters I use for testing are mode:3, channel:11, power: 245 test-tone:7