WOR_RX mode AX5043

Hello!
Could you please give an example how to use AX5043 in WOR RX MODE.
Preamble size TX side = 36 byte

Preamble setting RX side = 36 byte ( may be need set 16 ?)

My settings for WOR:

const uint16_t axradio_wor_period = 64; // 100ms

void ax5043_receiver_on_WOR(void)
{
  ax5043_set_register(AX5043_BGNDRSSIGAIN, 0x02);
  ax5043_set_register(AX5043_FIFOSTAT, 3);
  ax5043_set_register(AX5043_LPOSCCONFIG, 0x01);         // start LPOSC, slow mode
  ax5043_set_register(AX5043_PKTSTOREFLAGS, ax5043_get_register(AX5043_PKTSTOREFLAGS) & ((uint8_t)~0x40)); // Store ANT RSSI
  ax5043_set_register(AX5043_PWRMODE, AX5043_PWRSTATE_WOR_RX);
  ax5043_set_register(AX5043_IRQMASK0, 0x01); // Fifo not Empty interrupt
  ax5043_set_register(AX5043_IRQMASK1, 0x00);

  if ((ax5043_get_register(AX5043_PINFUNCPWRAMP) & 0x0F) == 0x07) // pass through of TCXO_EN
  {
    // F143_WOR_TCXO
    ax5043_set_register(AX5043_IRQMASK0, ax5043_get_register(AX5043_IRQMASK0) | (0x80)); // power irq (AX8052F143 WOR with TCXO)
    ax5043_set_register(AX5043_POWIRQMASK, 0x90);                                    // interrupt when vddana ready (AX8052F143 WOR with TCXO)
  }

  ax5043_set_register(AX5043_IRQMASK1, 0x01); // xtal ready
  {
    uint16_t wp = axradio_wor_period;
    ax5043_set_register(AX5043_WAKEUPFREQ1, ((wp >> 8) & 0xFF));
    ax5043_set_register(AX5043_WAKEUPFREQ0, ((wp >> 0) & 0xFF)); // actually wakeup period measured in LP OSC cycles
    wp += ax5043_get_register(AX5043_WAKEUPTIMER1) << 8 | ax5043_get_register(AX5043_WAKEUPTIMER0);
    ax5043_set_register(AX5043_WAKEUP1, ((wp >> 8) & 0xFF));
    ax5043_set_register(AX5043_WAKEUP0, ((wp >> 0) & 0xFF));
  }

Transceiver configuration: TCXO control on POW_AMP pin Mod ==7,
Led connected on pin AX5043_PINFUNCDCLK

So i have a fast blinking led - 10 times per second (100ms period) and when send packet led blink 1 time 200ms (it’s seems like receive preambule and go to RX_WOR flow chart (Figure 11 in Program Manual AND9347).
I can not understand - it’s a normal when every time when led blinks - receiver set IRQ_Pin into Active and Goes CPU wakeup ?

If i correct understand, IRQ pin should toggle to active only when all stage of RX_WOR is correct (preamble, Sync Word etc.)

I think problems in my misunderstanding how to correct set-up transceiver into WOR

Please help understand how to correct my settings.

Hi Alex.
A fully working example of Wake On Radio can be generated using AX-RadioLab. The GUI will automatically calculate the optimal parameters for both TX and RX depending on your packet size and transmit period. You can find a deeper explanation in the AX-RadioLab User Manual that can be found at C:\Program Files (x86)\ON Semiconductor\AX-RadioLAB\DOCU\AX-RadioLAB_user_manual.pdf or from the GUI as shown below.


Preamble size TX side = 36 byte. Preamble setting RX side = 36 byte ( may be need set 16 ?)

  • The RX preamble size should be of few bits (between 4 and 32 bits), as this is the length of the matching unit. Once the preamble is matched, the RX will keep receiving until the sync word and then packet is detected. If no preamble is detected, then it goes back to sleep.
  • The TX preamble size should be configured in a way that in the worse case scenario the RX shall at least receive 4-32 bits. This means that the TX preamble should be at least as long as the WOR-period, plus some margin (AX-RadioLab adds 20%). As shown below, with a WOR period of 200 ms, the TX Preamble is 240 ms long.

So i have a fast blinking led - 10 times per second (100ms period) and when send packet led blink 1 time 200ms
How long is your overall packet? If the total packet lasts longer then your WOR period (e.g. 150 ms) then your LED will ‘skip’ one period and re-blink on the next wakeup.

I can not understand - it’s a normal when every time when led blinks - receiver set IRQ_Pin into Active and Goes CPU wakeup ?
I don`t know how you programmed your LED to blink, but it is normal yes to have multiple IRQ events waking up the MCU. For example, if you debug a AX-RadioLab WOR example you will notice that the MCU is waken up upon RADIO_IRQ (line 627 of easyax5043.c) and in trxstate_rxwor case (line 831) the MCU is waken up in order to re-write the F30/F31/F32/F33 registers which contain the ADC gains.

	case trxstate_rxwor:
#if defined __ARMEL__ || defined __ARMEB__

#else
		//F143_WOR_TCXO
		//AX8052F143, WOR with TCXO: MCU needs to wake up upon TCXO enable / disable in order to get the TCXO_EN singal into the frozen GPIO
		if (radio_read8(AX5043_REG_IRQREQUEST0) & 0x80) { // vdda ready (note irqinversion does not act upon AX5043_REG_IRQREQUEST0)
			radio_write8(AX5043_REG_IRQINVERSION0, (radio_read8(AX5043_REG_IRQINVERSION0) | 0x80)); // invert pwr irq, so it does not fire continuously
		} else {
			radio_write8(AX5043_REG_IRQINVERSION0, (radio_read8(AX5043_REG_IRQINVERSION0) & (uint8_t)~0x80)); // drop pwr irq inversion --> armed again
		}
#endif // defined
		if (radio_read8(AX5043_REG_IRQREQUEST1) & 0x01) { // XTAL ready
			radio_write8(AX5043_REG_IRQINVERSION1, (radio_read8(AX5043_REG_IRQINVERSION1) | 0x01)); // invert the xtal ready irq so it does not fire continuously
		} else {
			// XTAL not running
			radio_write8(AX5043_REG_IRQINVERSION1, (radio_read8(AX5043_REG_IRQINVERSION1) & (uint8_t)~0x01)); // drop xtal ready irq inversion --> armed again for next wake-up
			radio_write8(AX5043_REG_0xF30, f30_saved);
			radio_write8(AX5043_REG_0xF31, f31_saved);
			radio_write8(AX5043_REG_0xF32, f32_saved);
			radio_write8(AX5043_REG_0xF33, f33_saved);
		}

I think problems in my misunderstanding how to correct set-up transceiver into WOR
I can really recommend generating an example in AX-RadioLab as I did here
WOR-AX8052F143.zip (2.2 MB) , and use that as starting point for your project.

Georgi thank you - problem solved.
P\S I tested WOR and return settings back into “time sync mode” (because found it more power effective (less consumption in my case)) .

1 Like