Skip to main content
Graduate II
March 18, 2025
Solved

STM32L4 B-L475E-IOT01A WiFi module via USART

  • March 18, 2025
  • 3 replies
  • 979 views

I am using the STM32L4 B-L475E-IOT01A board with the following modules:
Wi-Fi module Inventek system ISM43362-M3G-L44

Bluetooth module SPBTLE-RF

Documentation: https://www.st.com/resource/en/user_manual/um2153-discovery-kit-for-iot-node-multichannel-communication-with-stm32l4-stmicroelectronics.pdf

 

The problem is that currently both are using SPI3 and both need different bits and prescalers to work properly. 

Therefore, I am trying to use USART3 instead of SPI3 for the WiFi module (since the BLE module has only one possible interface, SPI3).

My question: How to use the WiFi module via USART, so that I can use SPI for the BLE module? 

Or are there any other ways to use both modules simultaneously?

 

 

    This topic has been closed for replies.
    Best answer by Mike_ST

    Hello,

    you can't use the USART3, as it would require another version of the Wifi module. USART is inactive on that one.

    For the background story, both the USART and SPI lines are connected to the module because at the time of the design, we just had the pinout of the Wifi module and did not know what interface would be useful in the end.

    + the unuseful USART lines have never been removed in the latest revisions of the PCB.

     

    >> The problem is that currently both are using SPI3 and both need different bits and prescalers to work properly.

    Same answer as above, hw design team didn't know about such details.

    You have to switch between the SPI settings depending of which module you are talking to.

    3 replies

    Super User
    March 18, 2025

    So you got it working with SPI3:

    https://community.st.com/t5/stm32-mcus-boards-and-hardware/wifi-on-stm32l4-b-l475e-iot01a-ism43362-m3g-l44/m-p/784298/highlight/true#M24807

    But you want to change to USART3 ?

     

    Which part are you stuck on:

    • refactoring the STM32 code to work with USART3 ?
    • how to get the Inventek module to use its UART port ?
    • how to configure the B-L475E-IOT01A board hardware ?
    • other ?
    fa31Author
    Graduate II
    March 19, 2025

    Yes, I got it working with SPI3, I am able to send AT commands and it receives the "OK" response and the IP-address from the WiFi module.

    And then I tried to change all the SPI3 related functions to USART3 after properly initializing it with correct settings (bauderate 115200, 8 bits, none parity and 1 stop bit). In the documentation, it is mentioned how USART3 is connected to the WiFi-module (hardware) and I have used the same pins. But I get no response from the WiFi module.

    So I am stuck on how to initialize the USART communication, is it anything I need to do to switch from SPI to USART? Any specific command that needs to be sent to the WiFI module to tell it to switch?

    Super User
    March 19, 2025

    First, check that your UART transmit & receive are actually work - and actually at the specified baud rate, etc.

    Separately, check that the WiFi module does respond to AT commands from a PC terminal.

    See the B-L475E-IOT01A schematics for hardware configuration.

     


    @fa31 wrote:

    is it anything I need to do to switch from SPI to USART? Any specific command that needs to be sent to the WiFI module to tell it to switch?


    You would have to study the WiFi module's documentation for that, and/or contact the manufacturer for support:

    https://www.inventeksys.com/ism4336-m3g-l44-e-embedded-serial-to-wifi-module/

    https://www.inventeksys.com/iwin/getting-started-guide/

     

    It's not entirely clear, but the board's User Manual suggests that the WiFi module firmware may be SPI-specific:

    AndrewNeil_0-1742379761839.png

    Again, Inventek and/or the module documentation should clarify that...

    fa31Author
    Graduate II
    March 19, 2025

    I have already gone through the documentation of both, the stm32 board and the WiFi-module. Other than the specific UART settings to use, I am unable to find any information. I think maybe the UART firmware needs to be flashed to the WiFi module. But how can I do that when it is connected to the STM32-board? 

    Thanks for the quick replies!

    Mike_STAnswer
    Technical Moderator
    March 19, 2025

    Hello,

    you can't use the USART3, as it would require another version of the Wifi module. USART is inactive on that one.

    For the background story, both the USART and SPI lines are connected to the module because at the time of the design, we just had the pinout of the Wifi module and did not know what interface would be useful in the end.

    + the unuseful USART lines have never been removed in the latest revisions of the PCB.

     

    >> The problem is that currently both are using SPI3 and both need different bits and prescalers to work properly.

    Same answer as above, hw design team didn't know about such details.

    You have to switch between the SPI settings depending of which module you are talking to.

    Super User
    March 19, 2025

    @fa31 wrote:

    The problem is that currently both are using SPI3 and both need different bits and prescalers to work properly. 


    But is that really a problem?

    Surely, an unselected device should be totally oblivious to what's happening on the bus? The settings only matter while the device is actually selected?