How to configure sidework RF switch and hardware frequency offset?

Hi

   I am a new sidework developer,I want to use our designed board to develop sidework, but there are some differents between 52840 + sx1262 Development board(52840dk, sx1262 evaluation board)with our board. 

Can you give me some suggestions to modify the code to adapt to our board? Thanks.

1. Is it feasible for us to use the interrupt monitoring method to control the RF switch in the sidework project?

Semtech RF switch control(in sidework use semtech_sx1262_antenna_enable_gpios to control ANT_SW )

ANT_SW is always 1 so when DIO2 is 1 RF1 on RF2 off, when DIO2 is 0, RF1 off RF2 on

Below is our circuit diagram.

When DIO2 is 1 we can through P1.04 to know DIO2 statu so we should control ANT_SW2(P1.02) = 0

at this time ANT_SW1=1, ANT_SW2=0  RF1 on, RF2 off.

When DIO2 is 0 we can through P1.04 to know DIO2 statu so we should control ANT_SW2(P1.02) = 1

at this time ANT_SW1=0, ANT_SW2=1  RF1 off, RF2 on.

We use P1.04 in the sidework project to monitor and control P1.02. Is this method defective or do you have any recommended methods? I look forward to your suggestions.

2. How to set the RF crystal calibration value of sx1262 in the sidework project?

Our module has a slight frequency offset in the lora radio frequency part and needs software to adjust.

In the LoRawan project we can use the following code to adjust the frequency offset when sending.

In the sidework project I found in semtech_radio_ifc.h have emtech_radio_set_trim_cap_val interface.

How can I use this interface in my project?

Thank you

  • Hello,


    Август said:
    Sorry for replying so late, because we are celebrating the New Year here

    No worries, I wish you a great year ahead.

    Август said:
    Can I change SX126X_DEFAULT_TRIM_CAP_VAL  value in config file?

    When you take the example of the current sample, here, within sidewalk.c, there is function called state_sidewalk_entry. Here you can read the radio configuration and pass it to the sid_platform_init. If you overwrite this callback before calling the sid_platform_init, the new value will be applied. So this can be one way to modify the default value without interfering with the default configuration. 

    You can either modify the callback, switch the define to a Kconfig, or swap the callback in the application. 

     

    I have discussed with experts and they mentioned that they will consider changing the define into Kconfig in the default callback, but for now the easiest solution is to overwrite the callback 

    .platform_init_parameters.radio_cfg.pa_cfg_callback before calling the sid_platform_init().

    Kind Regards,

    Abhijith

  • Hello,

       Thank you for your reply, it is very helpful to me.

    As I see, sid_platform_inif is included in state_sidewalk_entry and getting parameters is in front of sid_platform_inif, so we only need to modify the macro definition RADIO_SX1262_DEFAULT_TRIM_CAP_VAL in app_subGHz_config.c and it will take effect, is that right?

    ...

  • Hello,

    Yes, I guess it should work.

    Kind Regards,

    Abhijith

Related