-
Notifications
You must be signed in to change notification settings - Fork 166
Open
Labels
bugSomething isn't workingSomething isn't workinginternal bug trackerIssue confirmed and logged into the internal bug tracking systemIssue confirmed and logged into the internal bug tracking systemprojectsProjects-related (demos, applications, examples) issue or pull-request.Projects-related (demos, applications, examples) issue or pull-request.wifiWiFi-related issue or pull-requestWiFi-related issue or pull-request
Description
Caution
At the return point of ES_WIFI_HardResetModule
| return (ret > 0) ? ES_WIFI_STATUS_OK : ES_WIFI_STATUS_ERROR; |
It requires the return value of Obj->fops.IO_Init (i. e. if it's set, SPI_WIFI_Init) as ret >0. However, when mode passed to SPI_WIFI_Init is ES_WIFI_RESET, it calls SPI_WIFI_ResetModule and return its return value. The called reset module function only has two possible of return values, 0 or -1. So, the ES_WIFI_HardResetModule can only return the case of ES_WIFI_STATUS_ERROR.
ES_WIFI_Status_t ES_WIFI_HardResetModule(ES_WIFIObject_t *Obj)
{
int ret = 0;
LOCK_WIFI();
if (Obj->fops.IO_Init != NULL)
{
ret = Obj->fops.IO_Init(ES_WIFI_RESET); // SPI_WIFI_Init
}
UNLOCK_WIFI();
return (ret > 0) ? ES_WIFI_STATUS_OK : ES_WIFI_STATUS_ERROR;
}Describe the set-up
- stm32L475 discovery board
- STM32 System Workbench
Additional context
change it to ret == 0 may address this issue.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinginternal bug trackerIssue confirmed and logged into the internal bug tracking systemIssue confirmed and logged into the internal bug tracking systemprojectsProjects-related (demos, applications, examples) issue or pull-request.Projects-related (demos, applications, examples) issue or pull-request.wifiWiFi-related issue or pull-requestWiFi-related issue or pull-request
Type
Projects
Status
Analyzed