How to add Skyworks fem to nrf5340 audio

Hello,

I am using nrf5340 audio sample with the custom board. The nRF Connect SDK version I used is v2.7.0.

I referred to this post and tried to add skyworks fem to my nrf5340 audio application.

The following is the part I modified:

nrf5340_audio_dk_nrf5340_cpunet.overlay

/ {
    nrf_radio_fem: pa_lna {
        compatible = "skyworks,sky66112-11", "generic-fem-two-ctrl-pins";
        ctx-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
        ctx-settle-time-us = < 23 >;
        crx-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
        crx-settle-time-us = < 5 >;
        cps-gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
        tx-gain-db = < 13 >;
        rx-gain-db = < 14 >;
    };
};
&radio {
	fem = <&nrf_radio_fem>;
};

nrf5340_audio_dk_nrf5340_cpuapp.overlay

/ {
    nrf_radio_fem: pa_lna {
        compatible = "skyworks,sky66112-11", "generic-fem-two-ctrl-pins";
        ctx-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
        ctx-settle-time-us = < 23 >;
        crx-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
        crx-settle-time-us = < 5 >;
        cps-gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
        tx-gain-db = < 13 >;
        rx-gain-db = < 14 >;
    };
};

prj.conf

CONFIG_MPSL=y
CONFIG_MPSL_FEM_ONLY=y
CONFIG_MPSL_FEM_SIMPLE_GPIO=y

But it doesn't seem to work.

Is there any way to add skyworks fem to nrf5340 audio application?

  • Hello,

    Thank you for your assistance.

    I checked the .config file in build\zephyr folder and determined that there is no MPSL related configuration in my nrf5340 audio application.

    That means I have to join MPSL myself, but this brings me back to the problem I encountered earlier:

    My compile error is as follows:

    Once added, it will cause a compile error.

    CONFIG_BT_CTLR_TX_PWR_ANTENNA should be set in the firmware for the network core (BT_CTRL = Bluetooth controller ) , in your case it can be the ipc_radio remote image.

    Thank you for your suggestion, I will try to add CONFIG_BT_CTLR_TX_PWR_ANTENNA in my ipc_radio remote image after solving the other problems.

    Seems like the chip  has readback protection. Please check if you have enabled APPROTECT. 

    I tried adding the following configuration to prj.conf to disable APPROTECT, but still encountered failed due to memory protection error.

    CONFIG_NRF_APPROTECT_USE_UICR=n
    CONFIG_NRF_APPROTECT_LOCK=n

  • Hi Landy, 
    I don't think you should use CONFIG_MPSL_FEM_ONLY=y , you only use this if you want to use the radio directly and no BLE. https://docs.nordicsemi.com/bundle/ncs-2.8.0-rc2/page/nrf/app_dev/device_guides/fem/fem_mpsl_fem_only.html

    Also please set CONFIG_NRF_APPROTECT_USE_UICR=y , so that the firmware APPROCTECT will follow the UICR. 

  • Thank you.

    After I modified sysbuild/ipc_radio.conf to the following, the compile error did not occur again.

    CONFIG_MPSL=y
    #CONFIG_MPSL_FEM_ONLY=y
    #CONFIG_MPSL_FEM_API_AVAILABLE=y
    CONFIG_MPSL_FEM_SIMPLE_GPIO=y

    But I still don’t see MPSL related configuration in the .config file in build\zephyr folder.

    Also please set CONFIG_NRF_APPROTECT_USE_UICR=y , so that the firmware APPROCTECT will follow the UICR. 

    After I set CONFIG_NRF_APPROTECT_USE_UICR=y, I still got the error.

    C:\WINDOWS\system32>nrfjprog --memrd 0x4000150C --log
    [error] [SeggerBackend] - JLinkARM.dll ReadMem returned error 1.
    [error] [SeggerBackend] - JLinkARM.dll ReadMem returned error 1.
    [error] [SeggerBackend] - JLinkARM.dll ReadMem returned error 1.
    [error] [SeggerBackend] - JLinkARM.dll ReadMem returned error 1.
    [error] [SeggerBackend] - JLinkARM.dll ReadMem returned error 1.
    [error] [  nRF53] - The read access failed due to memory protection.
    ERROR: Access to the selected address is blocked by the SPU.

Related