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.

TM4C1294NCPDT: TI-RTOS NDK tcpechoIPv6 example error

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: EK-TM4C1294XL, SYSBIOS

Hello,

I am using the EK-TM4C1294XL eval board and I ran the tcpecho ipv6 example. I'm able to get an ipv6 and ipv4 addresses, but after some time, the program aborts

Here is what I get when the program aborts

ti.sysbios.family.arm.m3.Hwi: line 1095: E_hardFault: FORCED
ti.sysbios.family.arm.m3.Hwi: line 1172: E_busFault: IMPRECISERR: Delayed Bus Fault, exact addr unknown, address: e000ed38
Exception occurred in background thread at PC = 0x0001795e.
Core 0: Exception occurred in ThreadType_Task.
Task name: {unknown-instance-name}, handle: 0x20012ff8.
Task stack base: 0x20010b68.
Task stack size: 0x1000.
R0 = 0x00000000 R8 = 0x200101b6
R1 = 0x00000086 R9 = 0x20012e30
R2 = 0x00000001 R10 = 0x20010b04
R3 = 0x00000000 R11 = 0x00000000
R4 = 0x00000000 R12 = 0x00000000
R5 = 0x00000000 SP(R13) = 0x200118d0
R6 = 0x00000086 LR(R14) = 0x0001431b
R7 = 0x00000000 PC(R15) = 0x0001795e
PSR = 0x8100f000
ICSR = 0x00423803
MMFSR = 0x00
BFSR = 0x04
UFSR = 0x0000
HFSR = 0x40000000
DFSR = 0x0000000b
MMAR = 0xe000ed34
BFAR = 0xe000ed38
AFSR = 0x00000000
Terminating execution...

I'm not sure what to do next.

The stack size of the task was previously 1536. I increased it to 4096 and still got the same error

Any idea on how to solve the problem.

Thanks

AJ

  • Hi,

      Do you have the same problem if you run only the non-ip6 example. See below highlighted example. I want to know if you see any difference in your running. 

     Can you also increase the heap size from whatever the value you have currently. Perhaps double what you have right now and see if that makes a difference.

  • Hi Charles,

    I was able to run the "normal" tcpecho with no problems.

    I increased heap size to 32600 and I still had the same error. I also increased SWI and HWI stack size to 8192, still same error. I also increased default stack size for main network task and all NDK low, normal and high priority tasks to 4096 and still got the same error.

    On a different note, how many ipv6 addresses was I suppose to get? I got an ipv6 unique one first and then an ipv4 and then another ipv6, which is also unique and then after a few minutes, the program aborts to the error I specified.

    Regards

    AJ

  • Hi AJ,

      I run the stock ip6 example. I have let it run for a couple of minutes and don't see an issue so far. Will let it run for while. Can you try a different network. Just wanted to know if it has something to do with your DHCP server. Also look at the wireshark and see why your DHCP server is giving multiple addresses. 

  • Hi Charles,

     I think what happens is I first get the link local add, which is what you shaded yellow there. It's 64 bits.

    And then the second ipv6 I get is a 128 bit address, which is, I believe, consists of 64 bit network address and 64 bit node address. Shouldn't I expect this one?

    I wonder if the error is caused by this. Maybe some buffer is not big enough? I checked the buffer used in the IPv6DADStatus function and I increased the 40 to 46, which is the value of the macro INET6_ADDRSTRLEN in socket.h, but I'm still getting the error. 

    Also, just to let you know, the way I run the demo is I just load the firmware then run, but I don't send any tcp packets. For the normal tcpecho, it works fine. the MCU is just listening and waiting and never aborts. All my ipv4 TCP applications work fine and they're all based on this normal tcpecho demo. I assume it should work the same way with the ipv6 demo, that is even if I don't send packets, it shouldn't abort right?

    I don't know if I could wireshark this because the packets are not being sent/received to and from my PC. It's the communication between the TM4C and the router.

    Regards,

    AJ

  • Hi Charles,

    It looks like this person had the same problem, but I don't understand the solution

    RTOS/EK-TM4C1294XL: tcpEchoIPv6 - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    Regards,

    AJ

  • Charles,

    I tried to follow what was done in that post but it looks like the Rt6Update function already has a line checking if the ptr_rt6 is NULL

    void Rt6Update (HANDLE hRoute, UINT32 RxPacketType, UINT8* mac_address, UINT32 Flags, UINT32 Lifetime)
    {
    RT6_ENTRY* ptr_rt6;

    /* Get the routing entry. */
    ptr_rt6 = (RT6_ENTRY *)hRoute;
    if (ptr_rt6 == NULL)
    return;

    /* If we received a Router Advertisment; we need to update the routing table entry too. */
    if (RxPacketType == ICMPV6_ROUTER_ADVERTISMENT)
    ptr_rt6->dwTimeout = llTimerGetTime(0) + Lifetime;

    /* If the MAC Address is specified; and there exists an LLI6 entry update it too. */
    LLI6Update (ptr_rt6->hLLI6, mac_address, RxPacketType, Flags);
    return;
    }

    Regards,

    AJ

  • Hi AJ,

    Also, just to let you know, the way I run the demo is I just load the firmware then run, but I don't send any tcp packets. For the normal tcpecho, it works fine. the MCU is just listening and waiting and never aborts. All my ipv4 TCP applications work fine and they're all based on this normal tcpecho demo. I assume it should work the same way with the ipv6 demo, that is even if I don't send packets, it shouldn't abort right?

    Can you try sending some packets to the server? Does that also abort after sometime with the bus fault? 

    I don't know if I could wireshark this because the packets are not being sent/received to and from my PC. It's the communication between the TM4C and the router.

    Wireshark will capture the DHCP handshake. You should see DHCP Discover -> DHCP Offer -> DHCP REQUEST -> DHCPACK packets being handshake between the client and DHCP server. You might need to configure your switch to do mirroring so you can see all 4 phases. 

    It looks like this person had the same problem, but I don't understand the solution

    RTOS/EK-TM4C1294XL: tcpEchoIPv6 - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    I have problem opening the thread that was mentioned in the above link. Can you please tell me how did you retrieve the mentioned thread inside that post?

  • Hi AJ,

      I check route6.c file in ti\ndk\stack\route6\route6.c for MSP432E device and it has a slightly different code that checks for NULL. Can you try it? 

    void Rt6Update (void *hRoute, uint32_t RxPacketType, unsigned char* mac_address, uint32_t Flags, uint32_t Lifetime)
    {
        RT6_ENTRY* ptr_rt6;
    
        /* Get the routing entry. */
        ptr_rt6 = (RT6_ENTRY *)hRoute;
        if (ptr_rt6 == NULL)
            return;
    
        /* If we received a Router Advertisment; we need to update the routing table entry too. */
        if (RxPacketType == ICMPV6_ROUTER_ADVERTISMENT)
            ptr_rt6->dwTimeout = llTimerGetTime(0) + Lifetime;
    
        /* If the MAC Address is specified; and there exists an LLI6 entry update it too. */
        if(ptr_rt6->hLLI6 != NULL) {
            LLI6Update (ptr_rt6->hLLI6, mac_address, RxPacketType, Flags);
        }
        return;
    }

    See below compare. The left hand side is the updated Rt6Update() I see for the NDK version used for MSP432E MCU. 

  • Hi Charles,

    I have a feeling this is the solution. I tested my MSP432 launchpad with ipv6 udpecho and it works perfectly.

    I'll try it with the TM4C this time with this change. I already made the change but I am not able to build the using make. I'm trying to follow what the person did in the post

    when I use the command in the ti-rtos directory

    make -n --file=tirtos.mak ndk

    I get this error
    'make' is not recognized as an internal or external command,
    operable program or batch file.

    How do I use make?

    Thanks

    AJ

  • Hi AJ,

      Here is the link to rebuilding the NDK library. https://e2e.ti.com/support/processors-group/processors/f/processors-forum/947275/faq-how-do-you-rebuild-the-ndk

      Another easier way is to copy the ti\ndk\stack\route6\route6.c file to your current project directory. Make the modification and rebuild just the router6.obj. 

  • Hi Charles,

    I finally got it to work. I did your second suggestion, instead of rebuilding NDK.

    Thanks a lot.

    Another quick question though, I really like the TM4C line and we're planning to use the TM4C129 on a new product. It's just convenient because I've got schematics and working code in the past that I could migrate. I raised a question on this forum about TM4C obsolescence about 3 years ago.  I just wanted to raise it again, since we are planning on using it on a new generation product. What lead me to ask this now is that It worries me that it has been a while since NDK has been updated. It looks like the last TIVA TI-RTOS update was back in 2016. Could you please give me some info on the TM4C roadmap? Has there been any plans of ending it or will it be in the market for the next 15 years? Will there be some updates on TIVA TI-RTOS in the near future? 

    Thanks

    AJ

  • Hi AJ,

      Glad your problem is resolved.  TI is still actively promoting TM4C family of MCU. TM4C129 will be around for a very long time.