Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

FreeRTOS+TCP and FreeRTOS_NetworkDown

Posted by plek324 on June 7, 2018

Hi, I have 2 questions concerning FreeRTOS_NetworkDown() in FreeRTOS+TCP.

1) I have written an ethernet driver for the RX63N. My driver is highly based on the examples/implementations for other controllers. It works fine for a while now, but now I'm looking to the situations when somethings happen on the network, like the cable getting unplugged.

I see checks on the link status in the EMAC handlers, but shouldn't there be a call made to FreeRTOSNetworkDown()? That way the application can get notified whenever this happens, either through vApplicationIPNetworkEventHook() or FreeRTOSIsNetworkUp(). The application can then resume or restart the entire TCP-stack in a proper manner once the ethernet link is recovered.

2) After the user makes a change to the IP setting, like change the IP address or enabling/disabling DHCP, I also want to reset the TCP-stack, so I can start using the new settings without having to restart the entire device. Calling FreeRTOS_NetworkDown() seems to do the trick here, but it feels a bit naughty, since this is not an API call. Is there another way to achieve the same in a officially supported way?


FreeRTOS+TCP and FreeRTOS_NetworkDown

Posted by rtel on June 8, 2018

To question 1) Yes. The network event hook can process both "network up" and "network down" events. The events come from the portable layer (network interface) rather than the generic code that runs on all architectures. Not sure there are examples in our distributions.

2) I don't see a problem with calling NetworkDown here.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS v10.2.1 is available for immediate download. MIT licensed, includes 64-bit RISC-V, NXP Cortex-M33 demo, Nuvoton Cortex-M23 demo & STM32H745 dual core (AMP) demo.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Mediatek

Renesas

RISC-V

SiFIve RISC-V

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner