Other Parts Discussed in Thread: TMS320F28377D
Tool/software:
Dear TI hello,
I have a client who asked me to investigate their product. They are using the TMS320F28377D, and it seems that a reset is occurring, which they cannot detect via CAN.
I connected a JTAG probe to monitor the code execution, and I noticed that the eCAP counter does not exceed 1000, even though it is clocked at 200 MHz, which leads me to suspect a hard reset.
I developed a code to monitor this behavior, but since a reset is occurring, I am not sure if I managed to capture it. Here is the code I developed:
#pragma DATA_SECTION(por_count, ".TI.ramfunc");
#pragma DATA_SECTION(xrsn_count, ".TI.ramfunc");
#pragma DATA_SECTION(wdrsn_count, ".TI.ramfunc");
#pragma DATA_SECTION(nmiwdrsn_count, ".TI.ramfunc");
#pragma DATA_SECTION(hwbistn_count, ".TI.ramfunc");
#pragma DATA_SECTION(hibresetn_count, ".TI.ramfunc");
#pragma DATA_SECTION(sccresetn_count, ".TI.ramfunc");
volatile Uint16 por_count = 0;
volatile Uint16 xrsn_count = 0;
volatile Uint16 wdrsn_count = 0;
volatile Uint16 nmiwdrsn_count = 0;
volatile Uint16 hwbistn_count = 0;
volatile Uint16 hibresetn_count = 0;
volatile Uint16 sccresetn_count = 0;
void check_reset_cause(void)
{
Uint16 reset_cause = HWREGH(0x80); // Lire le registre RESC
// Vérifier chaque bit et incrémenter le compteur correspondant
if (reset_cause & 0x0001) por_count++;
if (reset_cause & 0x0002) xrsn_count++;
if (reset_cause & 0x0004) wdrsn_count++;
if (reset_cause & 0x0008) nmiwdrsn_count++;
if (reset_cause & 0x0020) hwbistn_count++;
if (reset_cause & 0x0040) hibresetn_count++;
if (reset_cause & 0x0100) sccresetn_count++;
// Effacer les bits de reset pour éviter les faux positifs
HWREGH(0x80) = reset_cause;
}
How can I reliably detect a reset on the TMS320F28377D, knowing that my eCAP counter does not exceed 1000 and I suspect a hard reset?
Thank you in adance
