2024-06-16 11:40 AM
STM32CubeIDE v.1.15.1
Currently on the official STM32F4 MCU package site there is a patch 1.28.1 to download which should include some fixes for ethernet issues (I hope those are fixes for issues I have) but this version is not availablie through Embedded Software Packages Manager (I did refreshed the list). I can download zip file from STM32CubeF4 - STM32Cube MCU Package for STM32F4 series (HAL, Low-Layer APIs and CMSIS, USB, TCP/IP, File system, RTOS, Graphic - and examples running on ST boards) - STMicroelectronics
but I can't import it using "From local..."
What's current status of 1.28.1 package?
I'm currently using 1.27.1 version, is there any reasonable way to update to newer package or do I have to generate a new project?
2024-06-16 12:54 PM
Is the zip file damaged? Check file package.xml in the root.
It should be:
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<Package DBVersion="2.0">
<PackDescription Release="FW.F4.1.28.0" Patch="FW.F4.1.28.1">
<Note Release="ReleaseNotes.html" Patch="ReleaseNotes_Patch.html"/>
</PackDescription>
</Package>
If looks OK:
* Back up the previous CubeH4 library directory
* Extract the patch zip over the CubeH4 library directory, let it replace all files.
2024-06-16 10:40 PM - edited 2024-06-17 12:45 AM
I followed you instructions and then changed library version in project.ioc. Reopened project, regenerated code and it seems like I'm using 1.28.1. Edit: Opened project in CubeMx, changed package version and regenerated code. Now .ioc won't open in STM32CubeIDE
Unfortunately still tcip_ip thread lock up in waiting for TxPktSemaphore in lol_level_output. I fill further investigate it and report on github. Everything worked fine until I've enabled HTTPD (just static). After that following steps can lock ethernet outpu:
1. Reset device
2. Ping device (just to test it works) -> works perfectly
3. send Get response -> HTTPS logs shows that everything is okey and it send reponse (it doesn't)
4. tcp_ip thread locked while waiting for TxPktSemaphore in low_level_output function.
static err_t low_level_output(struct netif *netif, struct pbuf *p)
{
uint32_t i = 0U;
struct pbuf *q = NULL;
err_t errval = ERR_OK;
ETH_BufferTypeDef Txbuffer[ETH_TX_DESC_CNT] = {0};
memset(Txbuffer, 0 , ETH_TX_DESC_CNT*sizeof(ETH_BufferTypeDef));
for(q = p; q != NULL; q = q->next)
{
if(i >= ETH_TX_DESC_CNT)
return ERR_IF;
Txbuffer[i].buffer = q->payload;
Txbuffer[i].len = q->len;
if(i>0)
{
Txbuffer[i-1].next = &Txbuffer[i];
}
if(q->next == NULL)
{
Txbuffer[i].next = NULL;
}
i++;
}
TxConfig.Length = p->tot_len;
TxConfig.TxBuffer = Txbuffer;
TxConfig.pData = p;
pbuf_ref(p);
if (HAL_ETH_Transmit_IT(&heth, &TxConfig) == HAL_OK) {
while(osSemaphoreAcquire(TxPktSemaphore, TIME_WAITING_FOR_INPUT)!=osOK) //LOCK wait forever
{
}
HAL_ETH_ReleaseTxPacket(&heth);
} else {
pbuf_free(p);
}
return errval;
}
2024-06-17 01:59 AM
I found solution to my problem with ethernet
Re: HTTP request to STM32 + LwIP results that Ping... - STMicroelectronics Community
Will 1.28.1 patch be available through Software manager in Cube? Now it hard to mantain correct version if one has to remember about manually applyting patch.