2018-04-14 04:49 PM
Hi all,
Have anyone tried to interface ISM43362 wifi module with STM32 via UART? Is there any available UART driver or example-tutorial?
In a custom PCB, we have connected ISM43362 module with L476 UART pins following B-L475E-IOT01 schematic. Later I found that the wifi driver in B-L475E-IOT01 is only provided for SPI (although ISM43362 is connected with both SPI and UART pins in
B-L475E-IOT01
). I'm not finding (overinternet) any UART driver for ISM43362 module that can be ported to this project.In the first attempt, I've started with B-L475E-IOT01 board and WiFi_Client_Server cube example and tried to replace SPI pin configuration by UART pins and SPI Transmit-receive instructions by UART Tx-Rx. It didn't work, probably SPI and UART communication protocol is different for ISM43362. I'm not finding the exact sequence of AT commands in the AT manual.
Please guide me if anyone interfaced
ISM43362 wifi module via UART.
Thank you in advance for your kind suggestion.
2018-05-03 12:14 AM
Hi Martin,
Its quite simple to make a UART interface to
ISM43362 wifi module.If you can see the call flow of
Please make a UART init in WIFI_init and use the HAL APIs to read / write from the interface.
Hope this helps you.
Thanks
Phanirajkiran
2018-05-03 12:25 AM
I am using STM32F4 EVALUATION Board. I want to implement an echo server based on netconn. I did the configuration of ethenret and tcp/ip and lwip. When I ping it works correctly but when type ' C:\>echotool IP_address /p tcp /r 7 /n 15 /t 2 /d Testing LwIP TCP echo server' in the command prompt it shows me this error ' reponse time out ' I did not understand why it is not working ???
when I debug the programm I noticed that the OS by osKernelStart does not call the function of tcpecho_thread that contains the foncions of receiving and sending datas. But it calls all the other thread.. I did not understand why It does not call the thread of tcp echo server.
I used this code for the tcp echo server
/*
* tcp_echoserver.c*///Includes#include 'DeclarationsCommunes.h'#if LWIP_TCP
#if LWIP_NETCONN#include 'lwip/sys.h'
#include 'lwip/api.h'#define TCPECHO_THREAD_PRIO ( tskIDLE_PRIORITY + 4 )
/*tcpecho_thread function description*/void tcpecho_thread(void *arg){struct netconn *conn, *newconn;err_t err, accept_err;struct netbuf *buf;void *data;u16_t len;LWIP_UNUSED_ARG(arg);
/* Create a new connection identifier. */
conn = netconn_new(NETCONN_TCP);if (conn!=NULL)
{/* Bind connection to well known port number 7. */err = netconn_bind(conn, NULL, 7);if (err == ERR_OK)
{/* Tell connection to go into listening mode. */netconn_listen(conn);while (1)
{/* Grab new connection. */accept_err = netconn_accept(conn, &newconn);/* Process the new connection. */
if (accept_err == ERR_OK){while (netconn_recv(newconn, &buf) == ERR_OK)
{do{netbuf_data(buf, &data, &len);netconn_write(newconn, data, len, NETCONN_COPY);}
while (netbuf_next(buf) >= 0);netbuf_delete(buf);
}/* Close connection and discard connection identifier. */
netconn_close(newconn);netconn_delete(newconn);}}}else{netconn_delete(newconn);}}}/****************** SERVER CODE ****************//*TCP echo server thread is created in tcpecho_init function*/void tcpecho_init(void)
{sys_thread_new('tcpecho_thread', tcpecho_thread, NULL, DEFAULT_THREAD_STACKSIZE, TCPECHO_THREAD_PRIO);}
#endif /* LWIP_TCP */#endif /* LWIP_TCP */
I am so blocked. Can anyone help me please ??
2018-05-03 01:52 AM
Hello Martin
First to debug this sort of issue is. Can you debug whether a first context switch is happening to your code or not. Please check this.
ThanksPhanirajkiran
2018-05-03 01:57 AM
I debug it but it blocks in the function that call the tcpechoserver '
tcpecho_init() ' when I stop the debug it goes to the 'portmacro.h ' file .. If I understandit well is it a problem of interrupt or memory of the heap.
Another question how to configure the heap memory ??
I am using freeRTOS v9.0.0
From stm32cubMX configuration I got only the 'heap_4.c' file
2018-05-03 02:58 AM
can you attach Portmacro.h. Looks to heap issue.
Once have a look to this VDO:
https://www.youtube.com/watch?v=C-Fg434jCdc
Please check the size of heap instartup_stm32XX.s ,
Heap_Size EQU
Please once readUM1722 manual from ST.
The total amount of available heap space is set by configTOTAL_HEAP_SIZE - which is defined in FreeRTOSConfig.h.
The xPortGetFreeHeapSize() API function returns the total amount of heap space that remains unallocated (allowing the configTOTAL_HEAP_SIZE setting to be optimised), but does not provide information on how the unallocated memory is fragmented into smaller blocks.
Thanks
Phanirajkiran
2018-05-03 03:07 AM
2018-05-03 03:14 AM
Hey echo server on STM32 is there on this manual.
Please once check this UM1713
DM00103685.pdf file name.
2018-05-03 03:17 AM
Yes I have this document and I am following it already and I did all what is supposed to be done but I do not know why I can not connect to the echo server. I does not recognize the IP dress when I ping it in the command prompt. I have two months now blocked in this situation and I do not what to do
Thank you for your help
2018-05-03 03:36 AM
Hey you are getting response timeout.
When i see the other link : its request time out .
https://forums.xilinx.com/t5/Embedded-Processor-System-Design/LwIP-echo-Server/td-p/25966
Just increase time out instead of 2 make it 6.