This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL2-RM57L: Not seeing data out of the board when running FreeRTOS and Lwip

Part Number: LAUNCHXL2-RM57L
Other Parts Discussed in Thread: HALCOGEN

I have LwiP 1.4.1 running on an RM57L with FreeRTOS. I can see that the lwip calls to write data out are working and the yellow light consistently flashes on the board when my program is running. I came across this post with someone dealing with a similar issue:

https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/547007?LwIP-RM57-configuration-problem 

The solution they are given is to "change to NORMAL_OIWTNOWA_NONSHARED (Write-through cache scheme)" but the page to change MPU options from my Halcogen file is frozen. How can I make this change?   

  • Hello,

    Yes, you are right. When using HALCoGen FreeRTOS, the MPU settings for first 4 regions are frozen. Please check the setting manually:

    vPortStoreTaskMPUSettings() in os_port.c
  • I made the following changes to vPortStoreTaskMPUSettings in os_port.c but I still don't see data coming out of my board:



    if( xRegions == NULL )
    {

    /* No MPU regions are specified so allow access to all of the RAM. */
    xMPUSettings->xRegion[0].ulRegionBaseAddress = 0x08000000;
    xMPUSettings->xRegion[0].ulRegionSize = portMPU_SIZE_512KB | portMPU_REGION_ENABLE;
    //xMPUSettings->xRegion[0].ulRegionAttribute = portMPU_PRIV_RW_USER_RW_EXEC | portMPU_NORMAL_OIWBWA_NONSHARED;
    xMPUSettings->xRegion[0].ulRegionAttribute = portMPU_PRIV_RW_USER_RW_EXEC | portMPU_NORMAL_OIWTNOWA_NONSHARED;

    /* Re-instate the privileged only RAM region as xRegion[ 0 ] will have
    just removed the privileged only parameters. */
    xMPUSettings->xRegion[1].ulRegionBaseAddress = 0x08000000;
    xMPUSettings->xRegion[1].ulRegionSize = portMPU_SIZE_4KB | portMPU_REGION_ENABLE;
    //xMPUSettings->xRegion[1].ulRegionAttribute = portMPU_PRIV_RW_USER_NA_NOEXEC | portMPU_NORMAL_OIWBWA_NONSHARED;
    xMPUSettings->xRegion[1].ulRegionAttribute = portMPU_PRIV_RW_USER_NA_NOEXEC | portMPU_NORMAL_OIWTNOWA_NONSHARED;

    ....
    }

    else{

    if( usStackDepth > 0 )
    {
    /* Define the region that allows access to the stack. */
    xMPUSettings->xRegion[0].ulRegionBaseAddress = (unsigned)pxBottomOfStack;
    xMPUSettings->xRegion[0].ulRegionSize = prvGetMPURegionSizeSetting( (unsigned long)usStackDepth * (unsigned long) sizeof(portSTACK_TYPE) ) | portMPU_REGION_ENABLE;
    //xMPUSettings->xRegion[0].ulRegionAttribute = portMPU_REGION_READ_WRITE | portMPU_NORMAL_OIWBWA_NONSHARED;
    xMPUSettings->xRegion[0].ulRegionAttribute = portMPU_REGION_READ_WRITE | portMPU_NORMAL_OIWTNOWA_NONSHARED;

    }
    }



    Are these the right changes? What else could be wrong with my project?
  • 4617.myHalcogenFile.zip I am including my halcogen file here to see if you can find something I am not doing

  • Hello Christian,

    Have you figured out how to modify the MPU settings in the FreeRTOS?
  • Yes I figured out how to modify the MPU settings. I can see data coming out of my board with a sharktap but not directly to another computer running wireshark. This is through a static lwip connection. I am also having trouble getting an LWIP DHCP connection working. Can you please review the Halcogen file that I uploaded.

  • Hello Christian,

    Attached please find the working example code for freeRTOS + LWIP on TMS570LC43x. You can use this sample code as reference. Import this project to your CCS, change the device endianness and part number in project property, also change the predefined the symbol in project property.

    3107.TMS570LC4357_FreeRTOS_LWIP.7z