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.

TM4C129ENCPDT: Hard Fault: FORCED: BUSFAULT: IMPRECISERR

Part Number: TM4C129ENCPDT

Hi All,

I am using TI RTOS and CCS6 with tm4c129encpdt and xdc tools 3.32

I am using httpcli library for https and mqtt.

I am creating MQTT client and able to send and receive messages. Also, I am able to do https using the same.

My issue is-

When I am creating mqtt client and does not close this connection (mqtt), my https is working fine. 

But when I close the connection for MQTT and again the try the HTTPS, my device is going into some hard loop. 

For https-

HTTPCli struct and others things are local but TLS for https is global. I am creating TLS only one time and using the same for each HTTP connection. 

For MQTT,

Upon closing the connection, I am deleting the TLS for MQTT also along with httpcli handle and all.

I tried with different combinations of HEAP and STACKS but nothing is working out. But when I close MQTT connection and along with it, if I delete the TLS of HTTPS,  and upon creating the new TLS for HTTPS, my HTTPS is working fine.

What I can see is somehow closing and deleting MQTT resources (cli handle and TLS) affecting the TLS of HTTPS. It is failing into some semaphore (screenshots attached)

Let me know

Thanks

Akhi

  • Hi,

      It seems like it has something to do with the TLS and I suppose you are using WolfSSL library, correct? We really don't have the experience with the WolfSSL/TLS. To isolate the problem, can you for experiment purpose not use the TLS? Without the TLS in play, will you be able to close MQTT and start regular HTTP? If the problem is indeed related to the presence of the TLS, then you will need consult with the WolfSSL.

      - What version of the WolfSSL library are you using? Can you try the latest version?

      - I know that the WolfSSL requires quite some stack and heap to operate correctly? You mentioned you increase the stack/heap but did you increase the stack and heap to the right amount? Why don't you try threadStackSize to 32768*2 to see if it makes a difference? Reading your exception call stack, you are getting a imprecise bus fault. Most of the time, this is related to the stack size allocation. Although unlikely, cannot rule out memory leak somewhere in the WolfSSL library or even NDK.

      Please also go through the below video for the common TI-RTOS application debugging tips. I find it quite useful. 

  • Hi Charles,

    I am getting this issue in the wifi (cc3100) also which uses simplelink stack

    There the issue is something different. 

    I tried without mqtt, only https and ftps.

    During HTTPS, I am creating the TLS and for FTPS, I am deleting the https tls and creating new tls for ftp. As ftps required 2 tls, one for command channel and one for data channel, the command channel tls is being created one time during the whole ftps session but for the data channel, I am creating new tls each time and deleting the old tls (as there may be multiple data sessions). 

    What I saw in wifi, during this process, later at some stage, I am getting error while creating the tls for the data channel. This is the error I am getting SL_ESECBADCERTFILE which means bad certificate file. 

    Upon debugging a bit more about ca file path and all, I found after  "t i _ n e t _ t l s 8 3 / ca . d e r"  (count 83) I am getting error. This count varies. Sometimes I am getting this error at count 38, sometimes 11, not fixed. 

    I observed when I use tls, the issue comes only then even though I am deleting the tls. Each time I create a new tls, the count no in the path increases from 0 to next no- t i _ n e t _ t l s0 / ca . d e r

    Is this a normal behavior to see a new path each time for new tls?

    All this I am using httpcli library which at the bottom uses simplelink apis. 

    Let me know.

    If you want to simulate this issue, use https and ftps (self signed certificate with Filezilla). I am making sure there are no more than 2 tls at a time is active.

    Thanks

    Thanks

  • Hi Akhilesh,

      I'm not able to support simplelink platform. Could you please open the ticket in the simplelink platform so the experts there can assist you. The TI-RTOS for TM4C does not support MQTT. I'm not sure where you get the MQTT code from. I will suggest you open the ticket with the simplelink forum if you get your library code there. Please update us what you find so it may benefit the community. 

  • Yeah sure. Opening new ticket on simplelink forum.

    Thanks