Can't control CPS and CSD pins of the SKY66112-11 FEM

Dear Sir/Madam,

I am trying to enable FEM support on zigbee/light bulb, and want to SKY66112-11 FEM working on Receive bypass mode. I set all pins at proper setting at initialzation state but I found all pins always at low level state and I can't change them.

dts:

nrf_radio_fem: fem_skyworks_node {
compatible = "skyworks,sky66112-11", "generic-fem-two-ctrl-pins";

ctx-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
ctx-settle-time-us = <1>;
crx-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
crx-settle-time-us = <1>;
csd-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* crx and csd connect together */
cps-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
ant-sel-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;

rx-gain-db = <11>;
tx-gain-db = <22>;
};

&radio {
status = "okay";
fem = <&nrf_radio_fem>;
};

Initialzation Code:
#if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), ant_sel_gpios)
    /* Configure ant_sel_gpios pin as active. */
    err = gpio_pin_configure(
        DEVICE_DT_GET(DT_GPIO_CTLR(DT_NODELABEL(nrf_radio_fem), ant_sel_gpios)),
        DT_GPIO_PIN(DT_NODELABEL(nrf_radio_fem), ant_sel_gpios),
        GPIO_OUTPUT_ACTIVE |
            DT_GPIO_FLAGS(DT_NODELABEL(nrf_radio_fem), ant_sel_gpios));
            LOG_DBG("Configure ant_sel_gpios pin as active.");

    if (err) {
        return err;
    }
#endif

#if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), csd_gpios)
    /* Configure csd_gpios pin as active. */
    err = gpio_pin_configure(
        DEVICE_DT_GET(DT_GPIO_CTLR(DT_NODELABEL(nrf_radio_fem), csd_gpios)),
        DT_GPIO_PIN(DT_NODELABEL(nrf_radio_fem), csd_gpios),
        GPIO_OUTPUT_ACTIVE |
            DT_GPIO_FLAGS(DT_NODELABEL(nrf_radio_fem), csd_gpios));
            LOG_DBG("Configure csd_gpios pin as active.");

    if (err) {
        return err;
    }
#endif

#if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), cps_gpios)
    /* Configure cps_gpios pin as active. */
    err = gpio_pin_configure(
        DEVICE_DT_GET(DT_GPIO_CTLR(DT_NODELABEL(nrf_radio_fem), cps_gpios)),
        DT_GPIO_PIN(DT_NODELABEL(nrf_radio_fem), cps_gpios),
        GPIO_OUTPUT_INACTIVE |
            DT_GPIO_FLAGS(DT_NODELABEL(nrf_radio_fem), cps_gpios));
            LOG_DBG("Configure cps_gpios pin as active.");

    if (err) {
        return err;
    }
#endif

#if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), crx_gpios)
    /* Configure crx_gpios pin as active. */
    err = gpio_pin_configure(
        DEVICE_DT_GET(DT_GPIO_CTLR(DT_NODELABEL(nrf_radio_fem), crx_gpios)),
        DT_GPIO_PIN(DT_NODELABEL(nrf_radio_fem), crx_gpios),
        GPIO_OUTPUT_ACTIVE |
            DT_GPIO_FLAGS(DT_NODELABEL(nrf_radio_fem), crx_gpios));
            LOG_DBG("Configure crx_gpios pin as active.");

    if (err) {
        return err;
    }
#endif

#if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), ctx_gpios)
    /* Configure ctx_gpios pin as inactive. */
    err = gpio_pin_configure(
        DEVICE_DT_GET(DT_GPIO_CTLR(DT_NODELABEL(nrf_radio_fem), ctx_gpios)),
        DT_GPIO_PIN(DT_NODELABEL(nrf_radio_fem), ctx_gpios),
        GPIO_OUTPUT_INACTIVE |
            DT_GPIO_FLAGS(DT_NODELABEL(nrf_radio_fem), ctx_gpios));
            LOG_DBG("Configure ctx_gpios pin as active.");

    if (err) {
        return err;
    }
#endif
I also tried to control the pin status by using blinky_FreeRTOS_pca10056.emProject example but the result are the same. I am sure there's no issue on hardware.
Can you help me analysis what's the issue could be? Thanks a lot.

Parents
  • Hello Searcher,

    What NCS version are you using for this?

    I also tried to control the pin status by using blinky_FreeRTOS_pca10056.emProject example but the result are the same. I am sure there's no issue on hardware.
    Can you help me analysis what's the issue could be? Thanks a lot.

    If you are not seeing an issue building, but the pins are not driven high I guess the hw could also be an issue. What makes you think HW is obviously not the issue? Is this a DK you are using or a custom board?

    Regards,

    Elfving

  • Thanks Elfving.

    Because I program an product binary file and those pins can be control, so I think no issue on HW (custom board).

    ncs v2.7.0 and nrf5_sdk_for_thread_and_zigbee_v4.2.0_af27f76

Reply Children
Related