I have an issue in FreeRTOS 9.0.0, when I am sending IPERF udp traffic with data rate set at 20Mbps, I see the Hard faults on ARM Corter CM7. The my_HardFault_Handler is caused by an
DataBus Error (ie. Data bus fault occurred but details have been lost due to
priorities delaying processing of the faults…) with imprecise error bit set.
SCB_CFSR_IMPRECISERR.
If I invalidate the ICache and DCache in port.c the problem of hard fault is not seen…
here is the below code…
/*
See header file for description. /
BaseType_t xPortStartScheduler( void )
{
/ configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to 0.
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
configASSERT( configMAX_SYSCALL_INTERRUPT_PRIORITY );
SCB_InvalidateICache();
SCB_InvalidateDCache();
I haven’t seen any fixes in FreeRTOS for invalidate cache while task switching… is this really bug??
Is the Ethernet using DMA? We have generally found that, if that is the
case, the easiest thing to do is to ensure the memory used by the DMA is
marked as non-cacheable - otherwise you will have two memory bus masters.
Do you know how to mark this data non-cacheable in FreeRTOS…
Also while writing data we use allocated buffer from heap…(TX) is there any way to mark some section of memory from heap as Non-Cacheable… using FreeRTOS-lwip stack…
Do you know how to mark this data non-cacheable in FreeRTOS…
It is not a FreeRTOS configuration, but an MCU configuration. The easiest way to do it is to place the network buffers in a known memory location, then mark that memory as non cachable in the C start up code. I think the Zynq demo does this already so you could use that as a reference.