Search code examples
embeddedwifistm32

STM32L475 Communication with Wi-Fi (ISM43362) Module


Since STM32CubeIDE doesn't have an example for communication between the board STM32L475 and its Wifi module ISM43362. I decided to write one myself using the HAL library. But after numerous attempts, the SPI communication will only receive a string of 1s. There's no actual data being transmitted from the Wifi module, contrary to what the ISM43362 data sheet stated (https://www.inventeksys.com/wp-content/uploads/ISM43362_M3G_L44_Functional_Spec.pdf).

Here's the SPI receive code HAL_SPI_Receive(&hspi3, (uint8_t*)spi_rxPtr, 255, 100);

Any help would be much appreciated!


Solution

  • I finally figured it out. There are two conditions that need to be done before reading from WIFI Module's AT command.

    1- Firstly, every read attempt must be followed by checking of DRDY line. This line guarantees that the WIFI module has data to transfer, in many cases the WIFI module takes longer to respond to a command, and fails to respond with correct data, when the read is issued. 2- (Incorporating the first) After power up reset of the WIFI module, we need to, straight up, issue a read command. The data back should be 0x15 0x15 \r \n if not there's an error.