added enet_descriptors_chain_init(ENET_DMA_TX);

enet_descriptors_chain_init(ENET_DMA_RX);
This commit is contained in:
Alexey Bazlaev 2023-02-08 19:16:36 +07:00
parent 29b097016f
commit 6515b14c30
4 changed files with 88 additions and 54 deletions

View File

@ -199,7 +199,7 @@ const BaseType_t xBacklog = 20;
{ {
/* Wait for a client to connect. */ /* Wait for a client to connect. */
xConnectedSocket = FreeRTOS_accept( xListeningSocket, &xClient, &xSize ); xConnectedSocket = FreeRTOS_accept( xListeningSocket, &xClient, &xSize );
//configASSERT( xConnectedSocket != FREERTOS_INVALID_SOCKET ); configASSERT( xConnectedSocket != FREERTOS_INVALID_SOCKET );
/* Spawn a task to handle the connection. */ /* Spawn a task to handle the connection. */
xTaskCreate( prvServerConnectionInstance, "EchoServer", usUsedStackSize, ( void * ) xConnectedSocket, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvServerConnectionInstance, "EchoServer", usUsedStackSize, ( void * ) xConnectedSocket, tskIDLE_PRIORITY, NULL );

File diff suppressed because one or more lines are too long

View File

@ -157,7 +157,7 @@
<Bp> <Bp>
<Number>0</Number> <Number>0</Number>
<Type>0</Type> <Type>0</Type>
<LineNumber>287</LineNumber> <LineNumber>202</LineNumber>
<EnabledFlag>1</EnabledFlag> <EnabledFlag>1</EnabledFlag>
<Address>0</Address> <Address>0</Address>
<ByteObject>0</ByteObject> <ByteObject>0</ByteObject>
@ -166,14 +166,14 @@
<SizeOfObject>0</SizeOfObject> <SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess> <BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount> <BreakIfRCount>0</BreakIfRCount>
<Filename>.\main.c</Filename> <Filename>.\DemoTasks\SimpleTCPEchoServer.c</Filename>
<ExecCommand></ExecCommand> <ExecCommand></ExecCommand>
<Expression></Expression> <Expression></Expression>
</Bp> </Bp>
<Bp> <Bp>
<Number>1</Number> <Number>1</Number>
<Type>0</Type> <Type>0</Type>
<LineNumber>286</LineNumber> <LineNumber>205</LineNumber>
<EnabledFlag>1</EnabledFlag> <EnabledFlag>1</EnabledFlag>
<Address>0</Address> <Address>0</Address>
<ByteObject>0</ByteObject> <ByteObject>0</ByteObject>
@ -182,7 +182,7 @@
<SizeOfObject>0</SizeOfObject> <SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess> <BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount> <BreakIfRCount>0</BreakIfRCount>
<Filename>.\main.c</Filename> <Filename>.\DemoTasks\SimpleTCPEchoServer.c</Filename>
<ExecCommand></ExecCommand> <ExecCommand></ExecCommand>
<Expression></Expression> <Expression></Expression>
</Bp> </Bp>
@ -213,6 +213,11 @@
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>frame</ItemText> <ItemText>frame</ItemText>
</Ww> </Ww>
<Ww>
<count>5</count>
<WinNumber>1</WinNumber>
<ItemText>dma_current_txdesc</ItemText>
</Ww>
</WatchWindow1> </WatchWindow1>
<MemoryWindow1> <MemoryWindow1>
<Mm> <Mm>

4
main.c
View File

@ -219,7 +219,7 @@ static void vInitMCU(void)
gpio_ethernet_phy_select(GPIO_ENET_PHY_RMII); gpio_ethernet_phy_select(GPIO_ENET_PHY_RMII);
/* Configure GPIO Alternate RMII function */ /* Configure GPIO Alternate RMII function */
gpio_init(RMII_TXD_PORT, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ, RMII_TX_EN); gpio_init(RMII_TXD_PORT, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, RMII_TX_EN);
gpio_init(RMII_TXD_PORT, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, RMII_TXD0); gpio_init(RMII_TXD_PORT, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, RMII_TXD0);
gpio_init(RMII_TXD_PORT, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, RMII_TXD1); gpio_init(RMII_TXD_PORT, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, RMII_TXD1);
@ -307,6 +307,8 @@ int main(void)
xTaskCreate( vTaskToggleLed, "ToggleLed", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+1, NULL); xTaskCreate( vTaskToggleLed, "ToggleLed", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+1, NULL);
xTaskCreate( vTaskHelloWorld, "HelloWorld", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+1, NULL); xTaskCreate( vTaskHelloWorld, "HelloWorld", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+1, NULL);
FreeRTOS_IPInit( ucIPAddress, ucNetMask, ucGatewayAddress, ucDNSServerAddress, ucMACAddress ); FreeRTOS_IPInit( ucIPAddress, ucNetMask, ucGatewayAddress, ucDNSServerAddress, ucMACAddress );
enet_descriptors_chain_init(ENET_DMA_TX);
enet_descriptors_chain_init(ENET_DMA_RX);
enet_enable(); enet_enable();
vTaskStartScheduler(); vTaskStartScheduler();
while(1); while(1);