AM6422: wl1837 wifi reset

Part Number: AM6422
Other Parts Discussed in Thread: WL1837

Tool/software:

Hello,

      We use the wl1837 module on the SK development board. What should we do if we want to reset the module during operation?Hope to receive your reply!

  • Hello,

    You have a couple of options. By default, the linux driver for the wl1837 already has an recovery method that will automatically reset the module should anything go wrong. It will also attempt to reconnect to the network after the full restart. There is nothing to do from the userspace side.

    You can also remove the respective kernel modules for the WL1837 and then re-insert them. It is effectively the same as restarting the module. 

  • Hello,

        I found a WiFi_EN enable pin. Can I achieve a reset by pulling this pin low and then high? If so, how long should the time interval between pulling the pin low and high be appropriate? Also, after pulling the pin low, do I need to remove the kernel module and then reinstall it?

  •     If it's simply a matter of uninstalling the module and then reinstalling it, how exactly should I proceed? Which related modules need to be uninstalled?
    After this type of installation completes, will it automatically reconnect without requiring any manual control?Is this equivalent to the effect of a full power cycle?

  • The WIFI_EN pin is used by the linux kernel driver. It is not exposed to the userspace, so you can't directly control it.

    And I don't mean to literally "uninstall" or "reinstall" the driver, I simply mean you can use the linux commands to temporarily remove and insert the linux kernel driver. Example:

    • Remove the drivers
      • rmmod wl18xx
      • rmmod wlcore
      • rmmod wlcore_sdio
    • Insert the drivers
      • modprobe wl18xx
      • modprobe wlcore
      • modprobe wlcore_sdio
  • Hello,

        Yes, the enable pin you mentioned is used by the driver. I created a driver module that can control this pin. Can I reset the WiFi by controlling this pin individually? Will the network be automatically reestablished after reset? Will the network also be automatically generated using the method you described? Is this the same effect as turning the module's enable function off and then on again?

  • I encountered the following information during power-up, but the WiFi functionality is working normally. What is this related to?

  • You can safely ignore this error. The driver is looking for a file "wl1271-nvs.bin" and it is being reported that the file is missing. There is no harm in seeing this printout so that's why the wifi is working fine.

  • Will the network be automatically reestablished after reset? Will the network also be automatically generated using the method you described? Is this the same effect as turning the module's enable function off and then on again?

    Yes, absolutely. The connection will be re-tried when the modules are removed and re-inserted using the commands above.

    I don't recommend creating a separate driver module for the WL_EN pin. You should let the current wl18xx and wlcore_sdio modules handle that for you.

  • Hello,

        We want to understand why it's recommended not to use the enable pin. If it is used, what expected errors might occur? Unloading the module only performs a software-level reset. We were wondering—if the module itself is in an abnormal state, could we use the enable pin to restore its state to normal?

  • Hi,

    Within the linux driver, you can not take control of the nRST pin. Linux will simply not let you take control of the resource.

    Unloading the module will also lower the nRST pin. 

    When the firmware crashes on the wl18xx, the linux module will automatically detect crash and attempt a firmware reset and then also attempt to restore the wifi connection. 

  • Hello,

        I checked the relevant drivers again and found that the pins are automatically controlled during module unloading and installation. Thanks for reminding me, and your reply has resolved my questions.