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.

[参考译文] TMS320F28377S:看门狗复位不工作

Guru**** 2392095 points
Other Parts Discussed in Thread: C2000WARE

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1427999/tms320f28377s-watchdog-reset-is-not-working

器件型号:TMS320F28377S
Thread 中讨论的其他器件:C2000WARE

工具与软件:

你好

我有如下所示的代码、尽管我启用了看门狗、但我可以在寄存器屏幕中看到 WDDIS 寄存器1、因此看门狗无法工作、这可能是什么原因、我的寄存器值看起来是正确的、我从 sysctl.h 库中获得了所有这些值

SysCtl_enableWatchdog(void)
{
EALLOW;

//
// Clear the disable bit.
//
HWREGH(WD_BASE + SYSCTL_O_WDCR) = (HWREGH(WD_BASE + SYSCTL_O_WDCR) &
~SYSCTL_WDCR_WDDIS) | SYSCTL_WD_CHKBITS;

EDIS;
}

我获取了上述寄存器设置

这是我的代码。

void main(void)
{
EALLOW;
PieVectTable.TIMER0_INT = &cpu_timer0_isr;
PieVectTable.TIMER1_INT = &cpu_timer1_isr;
PieVectTable.TIMER2_INT = &cpu_timer2_isr;
EDIS;

InitCpuTimers(); // Burada config ayarları yapabilirdik

ConfigCpuTimer(&CpuTimer0, 200, 1000); //1ms
ConfigCpuTimer(&CpuTimer1, 200, 100); //100 us
ConfigCpuTimer(&CpuTimer2, 200, 40); //40us

CpuTimer0Regs.TCR.all = 0x4001;
CpuTimer1Regs.TCR.all = 0x4001;
CpuTimer2Regs.TCR.all = 0x4001;
CpuTimer2Regs.TCR.bit.TSS = 1;

init_watchdog();
reset_watchdog();
Uint32 timer1_test_counter = 0;
interrupt void cpu_timer1_isr(void)
{
if (watchdog_flag == 1)
{

reset_watchdog();
}
else
{


}
DELAY_US(1);
}

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Aleyna、

    我看了你的 main ()你在哪里启用看门狗? 是否为 init_watchdog()?

    您是否尝试过 c2000ware 看门狗示例?

    谢谢