Please Release How to Make It Work AX5043 on Different MCU. Like Arduino

I have Spent and Make AX5043 Hardware for our Remote Projects.
Now I am unable to communicate with MCU through SPI. Please Release Sample code for Different MCU. AX-CodeBlock is not user friendly. There is no single video tutorial from ON Semi. SO Powerful Products but so less learning videos.

Hello. Thanks for your feedback. We do constantly enlarge our base of content (for example this Community Forum is constantly growing). For what concerns example code, our current suggested strategy is that customers would create projects in AX-RadioLab (code generated for our AX8052 and AXM0 MCUs) and then use that code as starting point.
We do not directly support generic libraries for third parties MCUs, but the source code of our radio drivers is accessible and can be ported to other platforms.

Currently you are finding hard to communicate via SPI with our radio? As long as you correctly port the “radio_write8” and “radio_read8” functions our C code will be compatible with your platform.

Please also check out on google for open source libraries build and shared by the AX5043 community. The AX5043 is a pretty popular radio and there are a series of great libraries out there. For example (all credits to the authors): Practical Decoupling Techniques Applied to a C-based Radio Driver - Embedded Artistry
(please note, these repositories are not written, maintained, or checked by On Semiconductor. Use at your own risk).

Good luck with your project, and don`t hesitate to contact us for further support.

The following post may also be helpful to guide porting efforts.

Hello Georgi,

Thank You for your Response.
Kindly Release Video Tutorial also are very helpful source learning.
Also have More employees like Jacob Johnson as He had ported code long time back to Arduino mbded. But that is noe obsolate.

ON Semiconductor has one chip to rule them all in current market. But lack of devoper friendly resources and less open community support. Its hard to play around.

Also in Ax-Radiolib Code is getting error and which is not working well.
Where to get standard code library of

As its not showing in Codeblock.

Best Regards,
Nishant Sharma

Hi Nishant, thanks for your suggestions and feedback on our great AX5043! We will keep your words in mind for our future collateral.

Regarding your inquiry “Where to get standard code library of easyax5043…” you can find this source code inside the project folder. For example if you create the project in AX-RadioLab as
you will find the easyax5043 .c/h source code in the c:\RadioLabProjects\ProjectFolder\COMMON folder.
Please also check your environment settings in CodeBlocks so that the included libraries are correctly fetched. If you still get a compile error, please upload a screenshot of the errors and I will assist you.

Thank You. I am able to generate Radio Lab Code. And Struggling to Make Arduino Compatible Code for Ax5043. I Spent 3 Weeks and Now we are looking for Some Other IC as Its too Difficult to work. Indian Market is Huge for this Products which we are working for. But Like Many Company Provide Arduino Friendly Code. for Their Product. We see huge scope with this ON Semi Product.

Hi Nishant, we understand your comment and I personally agree with you. The DIY guys as myself will always be thrilled to get Ardunio libraries for every device on the market :slight_smile:
My suggestion to your team would be to consider transitioning onto our AX8052F143 system on chip, so that you can fully reuse our MCU code and focus on the application. Our AX8052 microcontroller may be less flexible that Atmel chips used on Arduinos, but it does offer all the common peripherals required by an IoT application, while being extremely ultra low power. Give it a try!

Dear, I ported Library Generated by Radiolib to Arduino. Now Able to communicate with AX5043. Got Stuck on this loop.

void axradio_wait_for_xtal(void){

    for(timer = 0; timer < WAIT_FOR_XTAL_TIMEOUT; timer++){
      if (axradio_trxstate == trxstate_xtal_ready){





Hello. I see your loop implementation is slightly different from what was done in the easyax5043.c driver. We have an infinite for loop without a timeout and the whole code is interrupt driven and not polling. Be sure that this timeout doesn`t prevent the code to run correctly.

In our code, you can see that we understand when the XTAL is settled by checking the IRQMXTALREADY radio interrupt in vector IRQMASK1.
The interrupt handler axradio_isr() sets the axradio_trxstate = trxstate_xtal_ready when the interrupt fires when the settiling has started. The interrupt is enabled by writing AX5043_IRQMASK1 |= 0x01; // enable xtal ready interrupt. This overall process is explained on page 15 of the AX5043 Programming Manual.

Should I share all register value with my specification?

Are you sure that your radio is firing the interrupts? You can debug this by observing the IRQ pin with a scope/logic analyzer. To do so, set PINFUNCIRQ = 0x03 to “Output Interrupt Requests” on IRQ pin.

Another option, is to get inspired by our easyax5043.c library (interrupt driven), or the one above mentioned, made available on github by one of our customers (polling XTALSTATUS) ax/ax.c at master · richardeoin/ax · GitHub (please note, this is not an official On Semiconductor code repository!)

I think Problem is with my crystal capacitance.

  1. Should i completely remove Crystal Load Capacitors and use Internal Turing Capacitor? Will That Work?
  2. Please Tell Me How to decide Crystal Capacitance of external Crystal Oscillator ?

I am Using ECS-480-8-33B-CWY-TR Crystal . 48Mhz Crystal.

Even Though i check XTALSTATUS Always Returning 0
Tried Putting Everyvalue of Internal XTALCAP from 0-40. Nothing helps…Not Getting out of Loop.
Is there any limitation of using Crystal with 864.1 Frequency with 48Mhz Crystal?

What is your exact schematic for the network from XTAL to AX5043 ?

  • When using a TCXO, a specific attenuator/bias network is required ( ).
  • When using a XTAL, you should connect the two XTAL pins directly to CLKN and CLKP. Then you can just use the internal load capacitors by changing XTALCAP. You also have to adapt the loop gain (gm) tuning XTALOSC and XTALAMPL.

(By quickly inserting your values inside RadioLab, I get XTALCAP=0x01, XTALOSC=0x0D, XTALAMPL=0x07, but these are XTAL dependent so some trial and error with your specific board would be needed.)

To be also sure that the PCB is fine, check quickly with a scope if you have any oscillations on the CLK_N/P pins.

A post was split to a new topic: Documentation for AXRadio API

2 posts were split to a new topic: How to observe interrupts on IRQ pin of AX5043