cancel
Showing results for 
Search instead for 
Did you mean: 

webserver using NetXDuo Ethernet middleware - where to set RX buffer?

OskarP
Associate III

Originally a comment on this Knowledge Base article - moved to the main forum for better visibility


Hi @B.Montanari, @Lucas_Costa,

I'm following your tutorial and trying to implement a web server on an STM32H747IIT6.

In your post regarding the Ethernet settings, there is no field for setting the RX buffer address. Where should the RX buffer be placed?

My code is running, but my device never gets an IP address assigned. I also tested this on a Nucleo H755ZI with the same issue.

I'm using the latest version of CubeIDE (1.17) and the latest version of the middleware for the H7 series (Azure RTOS 3.3.0).

Best regards

Oskar P.

OskarP_1-1739184464339.png

 

 

3 REPLIES 3
mbarg.1
Senior

IP address and Rx buffer are 2 different questions.

Rx buffer is in app_azure_rtos.c:

/* USER CODE BEGIN NX_Pool_Buffer */

#if defined ( __ICCARM__ ) /* IAR Compiler */

#pragma location = ".NetXPoolSection"

#elif defined ( __CC_ARM ) || defined(__ARMCC_VERSION) /* ARM Compiler 5/6 */

__attribute__((section(".NetXPoolSection")))

#elif defined ( __GNUC__ ) /* GNU Compiler */

__attribute__((section(".NetXPoolSection")))

#endif

/* USER CODE END NX_Pool_Buffer */

 

IP address must be set - typically with DHCP

Also, avoid to use default MAC or you will have different eval boards conflicting.

I do use a mac derived from serial number toreduce risk of conflicts.

Hello mbarg.1,

Thank you for your response. I now understand how and where the RX buffer is placed.

I am aware that the IP address must be set, which is why I am using DHCP. I checked the network traffic with Wireshark.

Sometimes, I receive a DHCP request and a DHCP offer, but I never get a DHCP ACK from the board.

With LWIP, DHCP works fine. Could you take a quick look to see if I made an obvious mistake?

Best regards

Oskar P.

First thing I note that you have problem of my post 

  • STMCubeMX migration to v6.13 FW H7 V1.12

RxDescripSection in eth.c is not RxDecripSection in xxxflash.ld - an s is missing and that appears in v1.12.

I do not have an 747 board to make some debug, but you can have a look at incoming packets in  _nx_ip_packet_receive()

or just check counters in NetXDuoEthIpInstance.

/* Define the statistic and error counters for this IP instance. */

ULONG nx_ip_total_packet_send_requests;

ULONG nx_ip_total_packets_sent;

ULONG nx_ip_total_bytes_sent;

ULONG nx_ip_total_packets_received;

ULONG nx_ip_total_packets_delivered;

ULONG nx_ip_total_bytes_received;

ULONG nx_ip_packets_forwarded;

ULONG nx_ip_packets_reassembled;

ULONG nx_ip_reassembly_failures;

ULONG nx_ip_invalid_packets;

ULONG nx_ip_invalid_transmit_packets;

ULONG nx_ip_invalid_receive_address;

ULONG nx_ip_unknown_protocols_received;

 

/*lint -esym(768,NX_IP_STRUCT::nx_ip_transmit_no_route_errors) suppress member not referenced. It is reserved for application specific use. */

ULONG nx_ip_transmit_resource_errors;

ULONG nx_ip_transmit_no_route_errors;

ULONG nx_ip_receive_packets_dropped;

ULONG nx_ip_receive_checksum_errors;

ULONG nx_ip_send_packets_dropped;

ULONG nx_ip_total_fragment_requests;

ULONG nx_ip_successful_fragment_requests;

ULONG nx_ip_fragment_failures;

ULONG nx_ip_total_fragments_sent;

ULONG nx_ip_total_fragments_received;

ULONG nx_ip_arp_requests_sent;

ULONG nx_ip_arp_requests_received;

ULONG nx_ip_arp_responses_sent;

ULONG nx_ip_arp_responses_received;

ULONG nx_ip_arp_aged_entries;

ULONG nx_ip_arp_invalid_messages;

ULONG nx_ip_arp_static_entries;

ULONG nx_ip_udp_packets_sent;

ULONG nx_ip_udp_bytes_sent;

ULONG nx_ip_udp_packets_received;

ULONG nx_ip_udp_bytes_received;

ULONG nx_ip_udp_invalid_packets;

ULONG nx_ip_udp_no_port_for_delivery;

ULONG nx_ip_udp_receive_packets_dropped;

ULONG nx_ip_udp_checksum_errors;

ULONG nx_ip_tcp_packets_sent;

ULONG nx_ip_tcp_bytes_sent;

ULONG nx_ip_tcp_packets_received;

ULONG nx_ip_tcp_bytes_received;

ULONG nx_ip_tcp_invalid_packets;

ULONG nx_ip_tcp_receive_packets_dropped;

ULONG nx_ip_tcp_checksum_errors;

ULONG nx_ip_tcp_connections;

ULONG nx_ip_tcp_passive_connections;

ULONG nx_ip_tcp_active_connections;

ULONG nx_ip_tcp_disconnections;

ULONG nx_ip_tcp_connections_dropped;

ULONG nx_ip_tcp_retransmit_packets;

ULONG nx_ip_tcp_resets_received;

ULONG nx_ip_tcp_resets_sent;

ULONG nx_ip_icmp_total_messages_received;

ULONG nx_ip_icmp_checksum_errors;

ULONG nx_ip_icmp_invalid_packets;

ULONG nx_ip_icmp_unhandled_messages;

ULONG nx_ip_pings_sent;

ULONG nx_ip_ping_timeouts;

ULONG nx_ip_ping_threads_suspended;

ULONG nx_ip_ping_responses_received;

ULONG nx_ip_pings_received;

ULONG nx_ip_pings_responded_to;

ULONG nx_ip_igmp_invalid_packets;

ULONG nx_ip_igmp_reports_sent;

ULONG nx_ip_igmp_queries_received;

ULONG nx_ip_igmp_checksum_errors;

ULONG nx_ip_igmp_groups_joined;

Let me know if ot was useful.

Mike