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.

My application crashes

Other Parts Discussed in Thread: SYSBIOS

Hello,

I experiement a crash in my sysbios application and I'm unable to see where it crashes.

Our platform was pretty stable before adding another CAN communication thread (Task) responding on semaphore post (from CAN HWI thread).

I'm able to re-created the bug easily, but I'm unable to get to the point where it crashes. This bug is really not easy. It ceases to happened when we deactivate some optimization flags, or when we remove some apparently not related code, etc.

The application looks like this:

- One HWI high frequency thead in FIQ: I am almost 100% sure that this code is decoupled from the rest of application (BIOS). The interrupt comes from NHET module of TMS570. This thread trigs the SSI interrupt at slower rate.

-  One HWI thread in IRQ (BIOS). The interrupt comes from SSI. We called manually the BIOS TICK here and post a semaphore.

- One HWI thread in IRQ also. The interrupt comes from CAN communication. We post another semaphore here also. 

- Several others threads, all TASK type thread. One of this task, the lowest priority, runs continously. The other are blocked on semaphore or timeout.

So the problem happens when the CAN communication is involved, so CAN ISR, semaphore post and other processus triggered by timer, mailboxes.

Some suggestions in order to get more informations on what happened?

As it crashes, I can see on the debugger that the FIQ interrupt and its code continue to run, but the rest of this application is crashes (at 0x10 or 0x14) 

Setup:

TMS570, sysbios  3.20.8.88, IPC 1.22.3.23, CCS 5.1 N201104171800

Simon 

 

  • Simon,

    What version of SYS/BIOS are you using?

    Is usage of the CAN interrupt entirely new for the application - meaning once it was added the app started crashing?  Or was it there previously?

    Have you checked for stack overflows?  Maybe the CAN ISR context is too much for the configured stack? 

    Have you browsed with the ROV tool to see if any modules have odd state?

    What optimization flags are you changing that make the crash go away?

    When the crash occurs (with a branch to 0x10 or 0x14?), can you look at registers (like B14?) and stacks to tell where the CPU came from?

    Hope this helps some.

    Scott

  • Sysbios version is 6.31.4.27

    CAN was already functionning very well. We had NOT added new software component to our project. And all the BIOS ressources we are using was already successfully used before.

    So basically we've added another thread to process the CAN messages, a thread triggered by a semaphore post within the ISR. 

    Just yesterday we noticed that a pointer is corrupted as exiting the CAN ISR, but we don't know why.

    Regards. 

  • Hi Simon,

    When it crashes, can you post a snapshot of the following ROV windows: Task (Detailed), SysMin (OutputBuffer), Hwi (basic), HeapMem (Detailed), BIOS (Module and Scan for errors).

    Todd

  • Ok. And also may I send you a stripped down version of all my application project? How can I send you in a confidential way?

    If so, I'll tried to reearrange the application using the loop back of the CAN controller. So you will have a stand alone application with the bug. If it's not possible for me to use the loopback mode, have you the facilities on your side to send a specific CAN message? Have you an evaluation board and a device to send CAN messages (CANalyser from Vector for instance) ?

    Simon 

     

  • Simon,

    We (BIOS kernel group) do not have any CAN setup.

    Todd

  • 2742.after crash.rar

    I've removed the software module that was in FIQ and place it in IRQ. It still crashes.

    So this is a snap short of differents views you ask for.

    How it is possible to send you my code in a confidential way?

    It crashes after a while, after many CAN interrupt message transmissions, more than 100000 CAN frames!! But I sends 3000msgs/sec.

    Feel free to ask me for more.

    Simon 

  • Why are there two CAN interrupts (sorry, I don't know much about CAN). Could there be some interaction between the two interrupts that you are not handling properly.

    Have you tried to use the xdc.runtime.Log module to help debug? Log_printN (where N is the number of arguments) is a minimally intrusive logging API. You need to create a logger (look at the SYS/BIOS "Log example" on how to do this). You can look at the Log records in ROV then.

    Todd

  • Well the second CAN ISR is there for the port #2, which is NOT used at all, so there is no possible mix there.

    Well we do not have the feeling yet that this printf utilility is usefull for us since we have the debugger, break point, etc.

    Simon 

  • Log_print is not too intrusive and generally is a nice tool to use. You can put some in your driver and be able to help pinpoint the execution path.

  • Simon,

    Looks like you are using SYS BIOS with TMS570  ... can you tell me if you have gotten anything to work, because I didn't see that SYS BIOS was available for the Hercules parts.

     

    Regards,

    Tom Dillon

  • Hello,

    I don't know anything about Hercules parts, but yes sysbios works with tms570 (ls2 and ls3) for sure. But we are unable to have multiple interrupts. Just one it works but nothing more.  Both in FIQ and IRQ the problem is there.

    After pretty much deep investigation, we found that our problem is related with how the compiler generates the code related to interrupts.

    We hope that a new compiler version will fix this problem.

    Simon

     

     

     

     

  • Simon,

    TMS570 is a Hercules part ... So you have built a simple SYS BIOS program to work on the TMS570 say 20216SPGE part ?

    Regards,

    Tom

  • Todd,

    Does your group have a working SYS BIOS example for the TMS570 20216 part?

    Regards,

    Tom