This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3235MODSF: Auto_selection mode doesn't work with CC3235MODSF

Part Number: CC3235MODSF

Hi, I have some troubles with the realization of antenna switching using auto_selection mode with one GPIO line. I am using your network terminal example to test the automatic mode selection. Earlier I asked this forum about, Is it possible to use auto_mode selection with only 1 GPIO? Here is the link https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/1059695/cc3235modsf-questions-about-antenna-selection-usage
It seems that it is possible due to the reply. SDK version is 5.30.00.08. Below, you can see the questions with which I am having problems:

1) There are no problems switching manually with a single GPIO line. When I try to change the mode of antenna selection from Fixed one to Auto-select one using just 1 GPIO line, of course, disconnected from any Acces Point, it gives a SL_ERROR_INVALID_OPCODE error. Why is it happen?

2) In your example of auto_selection mode your engineers used the structure of 2 GPIOs. What is the exact model of the 2 GPIOs switch that is used in your reference design?

Best Regards, Alex.

  • Hi Alex,

    1. Have you made any changes to the default example? You say you are successful switching from Fixed to Auto-select, does that mean you changed the param.Mode field in the cmdAntSelectionEnablecallback (in wlan_cmd.c) to be SL_WLAN_ANT_SELECTION_MANUAL instead of  SL_WLAN_ANT_SELECTION_AUTO? Did you remove either Ant1Pad or Ant2Pad?

    I would expect an error if you removed a field from the param struct (like the param.Ant2Pad ) that is passed into the sl_WlanSet function. 

    A reset is also required to change configuration from manual to auto-select. This should be handled for you in the cmdAntSelectionEnablecallback. Do you see an error resembling: [AntSelectionEnable] : Command error received:xxx ?

    2.  The logic for switching between the GPIOs happens in the firmware. You can see where the GPIOs are specified here in wlan_cmd.c:

    Overall, it is not possible to use only one GPIO to determine which antenna using our default examples. You could create a circuit that only requires one input to select the antenna, but the firmware would still reserve the second GPIO for the antenna selection even if it is unused. 

    If you would like to use just one GPIO to select the antenna, you could do so in the application. You would need to remove all of the logic we provide for selecting the antennas and set the mode to be manual. Next, you could have the application scan on one antenna, read the RSSI, and then scan on the other antenna and read the RSSI. Afterwards, you can select the proper antenna to use.

    Just remember that the examples by default only select the best antenna once when first connecting to the station or access point. You would need to disconnect and reset the Network Processor (call Sl_Stop, then Sl_Start) to enable the device to connect with the best antenna. More details can be found in the Network Processor's Guide.

    Thanks,
    Jacob  

  • Hi Jacob, thanks for the fast reply.

    1) First, I would like to make it more clear, because some misunderstandings are in. I only switch antennas manually means that switching is happen with restarting the whole application. I didn't change the structure of cmdAntSelectionEnablecallback, only changed PAD numbers in code to the one that I needed. Didn't remove anything. I made some changes to the Radio Settings of image.siscgf. When I tried to switch to auto_selection mode via serial terminal, before connecting to any access point, it gives an error SL_ERROR_INVALID_OPCODE(14337L). I tried to switch from different modes like Manual or Fixed Ant1/ Ant2. By the way, the second antenna PAD is randomly chosen(to the empty one ofc), because we don't have the second GPIO line in our test design reference. I'm still trying to understand why this type of error occurs? What are possible reasons that give this error? Is it not possible to use Automatic mode with one GPIO line, even if the second antPad was not connected with but chosen from image.syscfg?

    2) Thanks a lot to explain the logic of the application. I am glad that I understood it correctly Innocent. But you don't write the exact model of the 2 GPIOs line switch used in your reference design. We want to use the switch that your engineers tested. It is really important to us to not have problems with selecting switch components.

    Have your good day,

    Best Regards, Alex.

  • Hi Alex,

    I'll follow up here later this week.

    Thanks,
    Jacob

  • Hi Jacob, just want to remind you that the week will be over soon.

  • Hi Alex,

    1. It is not possible to use only one GPIO with our antenna selection logic. This is because we use SKY13351-378LF as our antenna switch (see our reference design here). In the datasheet, you can find the truth table which requires two inputs:

    If you would like to only use one GPIO for antenna selection, you would have to disable our antenna selection logic (like the cmdAntSelectionEnablecallback) and manually control the GPIO with your application. This is not recommended as we recommend customers use our antenna selection enable logic. 

    2. See above for the antenna switch we use. 

    Thanks,
    Jacob