2025-03-18 10:07 AM - edited 2025-03-18 10:09 AM
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
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?
Solved! Go to Solution.
2025-03-19 6:20 AM
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.
2025-03-18 10:13 AM - edited 2025-03-18 10:14 AM
So you got it working with SPI3:
But you want to change to USART3 ?
Which part are you stuck on:
2025-03-19 1:15 AM
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?
2025-03-19 3:23 AM
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:
Again, Inventek and/or the module documentation should clarify that...
2025-03-19 4:01 AM
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!
2025-03-19 6:20 AM
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.
2025-03-19 7:35 AM
@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?