Sidewalk SubGhz fail/locks SX1262 on v1.16 with RAK4630

Dear Support

We currently use a custom PCB board with RAK4630 (NRF52840 + Semtech SX1262)

We started to try with RAK sample located here

https://github.com/RAKWireless/RAK4630-Amazon-Sidewalk-Example

We used the sample rak4631_sid_dut because it's easier with the shell to pass and test sidewalk commands using serial terminal

Of course we applied both RAK patches for this to work

1) The correct the RF Antenna SW by setting up GPIO 5 instead of 7 (see RAK4630 schematics)

GPIO 7 should not be used because RF Control switch RX/TX direction is toggled by DIO2 of semtech and RAK state this in the documentation

 

2) Fix TCXO Setting in  sidewalk/subsys/config/common/src/app_subGHz_config.c file as follow

	.tcxo = {
		.ctrl = SX126X_TCXO_CTRL_DIO3,
		.voltage = RADIO_SX126X_TCXO_CTRL_3_3V,
		.timeout = 320,
	},

Until there all is working perfectly fine we can use BLE and LoRa so send our packet and peak consumption when sending LoRa packet is correct 

Now we tried to update and move to latest samples from nrf 2.6-rc1 and sidewalk 1.16

github.com/.../sdk-sidewalk

We started from fresh workspace and applied again both previous patches from RAK, then we copied the overlay of the rak4631_nrf52840 board from previous RAK sample repository of course

sid_semtech: &spi1 {
    compatible = "nordic,nrf-spim";
    clock-frequency = <DT_FREQ_M(1)>;
    /delete-property/ cs-gpios;

    lora: lora@0 {
        status = "disabled";
    };
};

/{
    semtech_sx1262_gpios{
        compatible = "gpio-keys";
        semtech_sx1262_cs: cs {
            gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
            label = "semtech_sx1262 CS";
        };
        semtech_sx1262_reset_gpios: reset {
            gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
            label = "semtech_sx1262 Reset";
        };
        semtech_sx1262_busy_gpios: busy {
            gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
            label = "semtech_sx1262 Busy";
        };
        semtech_sx1262_antenna_enable_gpios: antena_enable {
            gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
            label = "semtech_sx1262 Antena Enable";
        };
        semtech_sx1262_dio1_gpios: dio1 {
            gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
            label = "semtech_sx1262 DIO1";
        };
    };
};

Building sample sid_end_device with overlay "overlay-dut.conf" (to be able to have shell) is fine, flash is fine and we can use dut  with BLE without any issue

But unfortunately as soon as we try to use sub_ghz semtech chip get locks in consumption of 30mA and only way top recover it to power cycle

sid stop and sid deinit does not recover semtech chip.

What is strange is that all is working fine with board nrf52840dk_nrf52840 + semtech SX1262 shield.

As the rak4631 overlay file is the same than in RAK sample that is working fine, we can assume that semtech pin definition of rak4631 overlay are correct and the issue is coming from something going wrong (changed) into SW stack (hard coded pin matching nrf52840dk + semtech and not other board?)

When we tried zephyr class A lorawan sample with rak4631 board it worked like a charm so this confirm that we can exclude any hardware issue since this issue is present only on sidewalk new version v1.6 

Since sidewalk stack is not open source we can't investigate further on our side (we'd loved to) so any sidewalk nrf guru's help would be very appreciated

I'm posting there because issues are disabled on  github.com/.../sdk-sidewalk

  • Hi again

    Just a quick update. NCS 2.6 is out now, and as they have changed the model for samples I will try to get back to you tomorrow when i have had the time to go through the changes

    Regards

    Runar

  • Hi Runar,

    saw that,  just made a fresh test, 

    looks like no more semtech locks issues for rak4631_nrf52840, we can see transmit peaks, but subghz is not working

    can't have the LoRa / FSK link to get up, I also tried with init 4 same issue.

    After some time we clearly see 10mA consumption guessing it's going to listen mode then throw some errors 

    here is the overlay of the RAK board I'm using


    /*
     * SPDX-License-Identifier: Apache-2.0
     */
    
    / {
        chosen {
            zephyr,console = &uart1;
            zephyr,shell-uart = &uart1;
        };
    };
    
    &gpio1 {
        sense-edge-mask = <0xffff3b9f>;
    };
    
    sid_semtech: &spi1 {
        compatible = "nordic,nrf-spim";
        clock-frequency = <DT_FREQ_M(8)>;
        /delete-property/ cs-gpios;
    
        lora: lora@0 {
            status = "disabled";
        };
    };
    
    /{
        semtech_sx1262_gpios{
            compatible = "gpio-keys";
            semtech_sx1262_cs: cs {
                gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
                label = "semtech_sx1262 CS";
            };
            semtech_sx1262_reset_gpios: reset {
                gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
                label = "semtech_sx1262 Reset";
            };
            semtech_sx1262_busy_gpios: busy {
                gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
                label = "semtech_sx1262 Busy";
            };
            semtech_sx1262_antenna_enable_gpios: antena_enable {
                gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
                label = "semtech_sx1262 Antena Enable";
            };
            semtech_sx1262_dio1_gpios: dio1 {
                gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
                label = "semtech_sx1262 DIO1";
            };
        };
    };
    

    this apart, and RAK TCXO patch nothing changed, compiled out of the box with

    west build -p -b rak4631_nrf52840 ./sidewalk/samples/sid_end_device -- -DCONF_FILE=prj_no_dfu.conf -DEXTRA_CONF_FILE=overlay-dut.conf

    Charles 

  • Thanks, I have asked the developers for some feedback. However from the looks of it seems like there might be an encryption error ref https://docs.sidewalk.amazon/assets/pdf/Amazon_Sidewalk_Sid_API_Developer_Guide-1.0-rev-A-032623.pdf 

    By the way, I see that you seems to be located in France. Do you use VPN to the US?

    Regards

    Runar

  • Hi Runar,

    Yes we have a VPN to the US, as I already mentioned here are the tests we made (all test made with RAK TCXO patch)

    • ncs 2.4 sidewalk 1.14 works fine on nrf52840DK+semtech and RAK4630
    • ncs 2.5 sidewalk 1.14 works fine on nrf52840DK+semtech and RAK4630
    • ncs 2.6 sidewalk 1.16 works fine on nrf52840DK+semtech
    • ncs 2.6 sidewalk 1.16 does not work on RAK4630

    So my guess is issue is related to v1.16 or ncs 2.6 (can't know) and how it interact/drive the semtech sx1262 chip 

    Regards,

    Charle

     

  • It seems like the error was a zephyr error ENOMSG. We are investigating what might be the issue. It seems like the device has tried to do timesync, and at some point it received the callback from the sidewalk or any other event trigger, and it failed to send this event to the main thread.

    Just to verify there has been no change in thread prio? I do not suspect it since you reported everything built out of the box

    Regards

    Runar

Related