You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Debugging the problem revealed the following possible issues in the driver,
The Wilc driver tries to access the SD registers (via call to wilc_sdio_init) after successfully calling the wilc_wlan_power_on_sequence function. However, it is possible that the WiFi chip isn't ready yet to respond to SD commands. Therefore, we should retry the first SD command multiple times before calling it quits. See https://github.com/cloudyourcar/attentive/blob/master/src/modem/sim800.c#L168 for reference where the Host MCU sends the "AT" command multiple times to the SIM80x modem to check if it has established a valid connection with the modem. If the modem doesn't respond after certain attempts, the driver assumes that the chip is either down or there is some issue in the UART driver and exits.
It was observed that the wilc_wlan_power function acquires the RE / EN gpios, sets them to output and then releases these GPIOs. However, releasing these GPIOs is not safe because it means that anyone else can then acquire these GPIOs and turn off the WiFi chip. Therefore, the state of GPIO cannot be guaranteed once the pins are released.
Though this does not have any valid explanation, but we had to comment out the code which sets the RE pins to low in the wilc_wlan_power function. If we add this code back, the WiFi chip fails to respond to SD commands in-spite of our fixes mentioned above.
Looking through the reported issues, it seems that we are not the first people who see these or similar issues and its best that these get resolved in the WILC mainline. Otherwise we have to maintain per-release patches which is a maintenance nightmare.
The text was updated successfully, but these errors were encountered:
bwasim
changed the title
WILC3000 problems when interfacing with PI CM3
WILC3000 problems with PI CM3
Aug 31, 2020
While interfacing the WILC3000 chip with CM3 module, we saw SDIO bus failures
Debugging the problem revealed the following possible issues in the driver,
wilc_sdio_init
) after successfully calling thewilc_wlan_power_on_sequence
function. However, it is possible that the WiFi chip isn't ready yet to respond to SD commands. Therefore, we should retry the first SD command multiple times before calling it quits. See https://github.com/cloudyourcar/attentive/blob/master/src/modem/sim800.c#L168 for reference where the Host MCU sends the "AT" command multiple times to the SIM80x modem to check if it has established a valid connection with the modem. If the modem doesn't respond after certain attempts, the driver assumes that the chip is either down or there is some issue in the UART driver and exits.wilc_wlan_power
function acquires the RE / EN gpios, sets them to output and then releases these GPIOs. However, releasing these GPIOs is not safe because it means that anyone else can then acquire these GPIOs and turn off the WiFi chip. Therefore, the state of GPIO cannot be guaranteed once the pins are released.wilc_wlan_power
function. If we add this code back, the WiFi chip fails to respond to SD commands in-spite of our fixes mentioned above.Looking through the reported issues, it seems that we are not the first people who see these or similar issues and its best that these get resolved in the WILC mainline. Otherwise we have to maintain per-release patches which is a maintenance nightmare.
The text was updated successfully, but these errors were encountered: