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.

TMS320F28379D: uC Resets when in CPU_2 a function call to Fapi_setActiveFlashBank(Fapi_FlashBank0) is made

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Dear TI support Engineers,

on one TMS320F28379D that we have soldered on one of our propriatery boards, following is happening:

When we run our software with the debugger, no resets are happening, but without a debugger, a reset is happening as soon as at CPU 2 a call to the function Fapi_setActiveFlashBank(Fapi_FlashBank0) is made.

This happens on only this speciffic board. On the other same boards the software runs without problems with or without debugger.

The question is what are the differences when the call to the function Fapi_setActiveFlashBank(Fapi_FlashBank0) is made when we run the software with and without the debugger?

Best regards

  • Hi,

    We will have our flash API expert respond to this next week. He is out of the office this week.

    I am not sure why this would be happening with or without the debugger connected.

    Can you explain to us how you know this is the function which is causing a reset? The reset may be occuring due to an NMI and the NMI watchdog. Can you log any useful information to know what might be causing the reset?

    Regards,
    sal
  • Thanx Sal for your reply,

    let me better describe the observations: it is impossible to debugg because this phenomenon doesn't occure when we trace the execution of the C code with the debugger. As there are three LEDs on the board (Red, Green and Blue), I have instrumented the C code to turn on the red LED when the uC starts to execute the C code, and CPU 2 should turn on the green LED after the named flash APi function. The result is that when the CPU is powerd on, the red LED blinks with very high frequency, and the green led doesn't turn on at all. When the call to the named function is commented out, there are no resets happening -> the red LED stays ON and the green one is also ON.

    I know that this problem occures on only one board (at the moment) with the mentioned uC. There is no problem on one other board of same design on which I have tested the same C code. There is also no problem when I tested the same C code on an evaluation board with the same uC. I am somehow convinced that this specific Boar/uC has same damage. But never the less I just want to know why there could be a different behaviour when I run the code with the debugger as with out it.

    Regards,

    Ivan

  • Ivan,

    Please check this thread: https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/651633/2394043 

    In the F2837xD Flash API reference guide (http://www.ti.com/lit/pdf/spnu629), please look at the NOTE provided in the description of the Fapi_setActiveFlashBank() function in section 3.2.1.  

    More explanation is provided in http://processors.wiki.ti.com/index.php/Flash_FAQ: In this wiki, search for "Why is a NMI (due to double bit errors) occurring when Fapi_setActiveFlashBank() is called on F2837xD CPU2?"

    Thanks and regards,

    Vamsi

  • Hi Vamsi,

    thanx, that solved it.

    But I still don't get what's the difference between when I run the code with the debugger and without it.

    Regards,

    Ivan

  • Ivan,

    Glad that it helped. When the debugger is connected, gel file disables ECC - hence you did not notice this issue.

    Thanks and regards,
    Vamsi
  • Ivan,

    A quick question: Don't you use Flash initialization function from C2000Ware? It enables Flash ECC-check and hence you should see ECC errors (reset) even in the debugger connected case. Please note that the initialization function configures Flash wait-states and Flash bank's fallback mode etc. - hence you need to use it (unless you have custom code to do the same thing).

    Thanks and regards,
    Vamsi
  • Ivan,

    I am closing this thread. If you have further questions, you can open a new thread.

    Thanks and regards,
    Vamsi