Where can I find software example how to use KW41Z with external amplifier? My application uses BLE and Thread.
I have to know how configure Wireless Connectivity stack to control RX_SWITCH and TX_SWITCH pads connected to my external amplifier.
I have connected external amp this way (fig from kw41z reference manual):
Solved! Go to Solution.
Hello Lukasz,
To enable the TX/RX switch pins, you need to configure the mux of the pins, the timing registers for the TX/RX switch signals and enable the RX/TX_SWITCH on the FAD_CTRL register.
You can use the following code as reference. Include fsl_port.h and Phy.h.
PORT_SetPinMux(PORTC,2u,kPORT_MuxAlt2); // PTC2 as TX_SWITCH
PORT_SetPinMux(PORTC,3u,kPORT_MuxAlt2); // PTC3 as RX_SWITCH
// TX_SWITCH output is derived from TSM output gpio2_trig_en
// Timings for assertion/de-assertion for GPIO2_TRIG_EN
XCVR_TSM->TIMING49 = 0xFFFFFF01;
// RX_SWITCH output is derived from TSM output gpio2_trig_en
// Timings for assertion/de-assertion for GPIO3_TRIG_EN
XCVR_TSM->TIMING50 = 0xFF01FFFF;
// Enable RX/TX_SWITCH
PhyPlmeSetANTPadStateRequest(FALSE, TRUE);
Regards,
Gerardo
Hello Lukasz,
To enable the TX/RX switch pins, you need to configure the mux of the pins, the timing registers for the TX/RX switch signals and enable the RX/TX_SWITCH on the FAD_CTRL register.
You can use the following code as reference. Include fsl_port.h and Phy.h.
PORT_SetPinMux(PORTC,2u,kPORT_MuxAlt2); // PTC2 as TX_SWITCH
PORT_SetPinMux(PORTC,3u,kPORT_MuxAlt2); // PTC3 as RX_SWITCH
// TX_SWITCH output is derived from TSM output gpio2_trig_en
// Timings for assertion/de-assertion for GPIO2_TRIG_EN
XCVR_TSM->TIMING49 = 0xFFFFFF01;
// RX_SWITCH output is derived from TSM output gpio2_trig_en
// Timings for assertion/de-assertion for GPIO3_TRIG_EN
XCVR_TSM->TIMING50 = 0xFF01FFFF;
// Enable RX/TX_SWITCH
PhyPlmeSetANTPadStateRequest(FALSE, TRUE);
Regards,
Gerardo
Thank you!