AXM0F343 - Changing Frequency's without Re-Programing

Hey is it possible to change the frequency of the AXM0F343 to a different frequency while the device is running.

For instance programing the device to switch carrier frequency’s between 900MHz and 70MHz (or lower) upon a specific interrupt.

I’m assuming it would require a few clock cycles to change as well as a few registers. Which ones in particular would I be looking for? What would be the easiest way of going about doing this change in the software?

1 Like

Hi Alex,

Which frequency is preferred ? You could change carrier frequency with example code to select 915Mhz or 868.3MHz in .rteconfig file.

Thanks,
Eric

1 Like

Hey sorry if my question was unclear. I know how to change the carrier frequency using the ax utility tool and the wizard config. I am trying to figure out the best way to have a range of different channels to broadcast with that span a large range. Basically changing the carrier frequency every few seconds.

Hi @alex.klassen,
as written in the datasheet our radio can span over frequencies from 27 MHz to 1050 MHz, but with some precautions. As shown below and briefly discussed in FAQ: Internal or External VCO inductor with AX5043, the VCO of the AXM0F343 uses:

  • Internal VCO + Internal Inductor to range between 400 MHz and 1050 MHz,
  • Internal VCO + External Inductor to range from 27 MHz to 525 MHz.

In your application, you can hop from one frequency to the other via software only for frequencies above 400 MHz, while for lower frequencies, your achievable range depends on the inductor that is placed on your PCB, as shown in Table 11 of the AXM0F343 Datasheet:

For the actual frequency hop we can recommend using the UINT8_T AXRADIO_SET_CHANNEL(UINT8_T CHNUM) which takes care of loading the FREQA/B register, initiating the auto-ranging process, and performing the hop. Some comments on the topic in this post AX5043 & STM32 Res - #11 by georgi.gorine - Sub-GHz - onsemi Community Forums

If I wanted to go from the internal VCO at 900, to somthig lower that uses an external inductor on the pcb, the set channel wont work properly right? Wouldn’t I need to change some of the values in the physical layer as well as the registers to accommodate for this before calling the set channel function?

The set_channel routine alone, without any extra programming, will work for frequencies where the sole PLLRANGING is enough to re-lock.
Lets say you want to operate at 169, 908 and 915 MHz. You could use the internal inductor to lock at 908/915 and use set_channel to hop between the two channels without changing any other register.
While for the 169 hop, you could do that by moving from internal to external inductor, as well as reprogramming all the other registers that differ due to the lower band. The easiest way to generate a list of registers that need changing, is to use the AX-ConfigurationUtility to create a project at 169 and at 908 and compare the config.c files to see what registers need to be reprogrammed for the proper hop.

So I was able to change the frequency to a lower band by entering a critical state and changing the registers. However it only works when the radio is in AXRADIO_MODE_CW_TRANSMIT mode. My attempts to get this to work in AXRADIO_MODE_ASYNC_TRANSMIT or AXRADIO_MODE_ASYNC_RECEIVE have had no success.

I attempted to fix by auto ranging with the code below with no success. Also attempted to re-initialize the registers thinking that it would help, however this also did not work as intended. Is there something in the continuous mode that isn’t in the asynchronous tx that is adjusting the frequency’s? Could it be a power mode issue?

radio_write8(AX5043_REG_PLLRANGINGA, (value & 0x18));


Hi Alex, how do you define “no success”? The radio stops responding or the channel doesn’t change?
The CW_TRANSMIT mode differs by the fact that after initialization the radio is always kept in FULL_TX with the FIFO being continuously filled so that the transmission never ends. In such scenario, whatever change you will do to radio-registers will immediately result in a measurable change as the whole transmitting circuitry is running.
When using the ASYNC modes, the radio is set to FULL_TX and FULL_RX only when there is the need of actual radio communication. For the remaining time the radio is set back to POWERDOWN.

As mentioned above, you shall use the set_channel() routine alternating it with correct power mode. If you are unsure which power mode you are in, you could intentionally set:

radio_write8(AX5043_REG_PWRMODE, AX5043_PWRSTATE_SYNTH_RX); //Pause the receiver
axradio_set_channel(1); //change channel
radio_write8(AX5043_REG_PWRMODE, AX5043_PWRSTATE_FULL_RX); //Re-enable the receiver

Be sure that AX5043_REG_PLLLOOP doesn’t get overwritten along your code. As you can see the last bit defines if you are operating at FREQA or FREQB. Both ax5043_set_registers_rx and ax5043_set_registers_tx do write to PLLLOOP and may overwrite your FREQSEL.

So my first sucsessfull attempt as switching between large frequency bands was between 900 and 50MHz. It was done in CW_TRANSMIT mode. I didn’t use the set channel function, just changed the values of the constants and registers as seen below.

uint8_t crit = enter_critical();

radio_write8(AX5043_REG_MAXRFOFFSET1   ,                              			0x06);
radio_write8(AX5043_REG_MAXRFOFFSET0   ,                              			0xF4);
radio_write8(AX5043_REG_PLLVCOI        ,                              			0x96);
radio_write8(AX5043_REG_0xF34          ,                              			0x08);

radio_write8(AX5043_REG_PLLLOOP        ,                              			0x07);
radio_write8(AX5043_REG_PLLCPI         ,                              			0x12);
radio_write8(AX5043_REG_PLLVCODIV      ,                              			0x20);

*prt_vco = 1;

*prt_offset = 5340;
*prt_chanfreq = 0x37e6d9b7;
*prt_chanpllringinit = 0x08;
*prt_chanvcoiinit = 0x96;

exit_critical(crit);

I didn’t get the set channel function to work properly. Using it would result in getting stuck in the default handler. My attempt to use the code above on the TX async mode resulted in no frequency change. Or it would just not transmit when told to go to a different frequency.

Intentionally changing the power mode did not change anything. It resulted in the same issue of the frequency not changing.

I think your right and that Its not ranging properly. My attempts of changing the power mode when using the set channel command were unsuccessful. I got stuck back in the default handler again. When using the debugger it would skip from line 1946 to 1969 so I’m a little lost on what exactly is going wrong there.