Streaming buffers of float numbers via ETH (STM32H7 nucleo)
Posted on December 07, 2017 at 22:04
Hello,
I have created via the cubeMX project for my stm32H7 nucleo board, it has Eth + lwip+ freeRTos + dhcp + dma + tcpServer.
I updated the linker file and changed the cube generated code related to the ETH pins, added dhcp thread and added a TCP server thread.
PS: my MPU is set to 1500, and I do not use cache.
Now I want to stream buffers of float numbers via ethernet,
the tcp server in the example code uses netconn_write to send data, so I used this method as well with the flag NO_COPY, but then, if I send the data to fast the write hangs. If I use vTaskDelay(200) between my writes, all works fine.
I would prefer to perform writes with a callback, so i want to use this callback HAL_ETH_TxCpltCallback but it is not fired, I can see that the packet is transmitted and I can perform async read from the tcp client, after that HAL_ETH_IRQHandler is firing and this code should be executed but it never does:
/* Packet transmitted */
if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_TI) && __HAL_ETH_DMA_GET_IT_SOURCE(heth, ETH_DMACIER_TIE))
{
/* Transfer complete callback */
HAL_ETH_TxCpltCallback(heth);
/* Clear the Eth DMA Tx IT pending bits */
__HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_TI | ETH_DMACSR_NIS);
heth->ErrorCode = HAL_ETH_ERROR_NONE;
heth->gState = HAL_ETH_STATE_READY;
}
I saw that it was investigated here:
aleksandar.radulovic
‌
Any help/advise is appreciated!
Marina
null