I was using the FreeRTOS+TCP using heap_5 on an external RAM, and was working well.
But now in other project i need to use without external RAM. The LPC1788 has two blocks of memory, one with 64KB, and other 32KB for peripherals (USB, Ethernet, LCD, etc). When i work using heap on RAM_32, this works, but don’t have space enough, because i need to allocate space for USB and Ethernet, but when i try use heap for freertos on RAM_64 doesn’t work.
Why on external RAM and RAM_32 works, and RAM_64 doesn’t work?
What i do to solve this problem?
This hardware use a board from Embedded Artists, and our base board. The error that occours is don’t resolve the DHCP, don’t connect to local network on my router.
I think doesn’t matter, because i try use RAM_32 and allocate the freertos on RAM_64, but don’t work. The only problem on RAM_32 i have is the space, because i need majority for USB and Ethernet.
i found what occours, in this line lPacketCount = ( BaseType_t ) listCURRENT_LIST_LENGTH( &( pxSocket->u.xUDP.xWaitingPacketsList ) ); on function FreeRTOS_recvfrom not return never a valid value for lPacketCount.
Into this function the pxList->uxNumberOfItems return the value 0, i don’t understand why.
When don’t work, stay in a infinit loop, calling this function. But when works, using external ram or RAM_32, the first time with pass in this part with error, but the next pass with success.
Could it be variables stored in the larger RAM are not being initialised correctly in the C startup code? I think this issue is to do with the linker or chip configuration rather than FreeRTOS itself.
I think the problem is related with send, because i open the wireshark to analyze, and on external RAM and RAM_32 the board sends the package DHCP, and on RAM_64 didn’t.
@ulysses : I’m afraid I don’t know much of your MCU.
Are you sure what RAM areas are implemented?
Have you tested the different RAM areas?
Are there areas that can not be used for DMA?