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.
客户在系统初始化后启用看门狗后报告了一个问题、我在 C2000WARE 示例中重复了该问题。
示例是 C2000WARE F28002x Driverlib 示例文件夹中的"ePWM_ex13_up_AQ"。 唯一的更改是在 所有初始化设置之后添加看门狗启用代码"sysctl_enableWatchdog()。
void main(void) { // // Initialize device clock and peripherals // Device_init(); // // Disable pin locks and enable internal pull-ups. // Device_initGPIO(); // // Initialize PIE and clear PIE registers. Disables CPU interrupts. // Interrupt_initModule(); // // Initialize the PIE vector table with pointers to the shell Interrupt // Service Routines (ISR). // Interrupt_initVectorTable(); // // For this case just init GPIO pins for ePWM1, ePWM2, ePWM3 // Board_init(); // // Interrupts that are used in this example are re-mapped to // ISR functions found within this file. // Interrupt_register(INT_EPWM1, &epwm1ISR); Interrupt_register(INT_EPWM2, &epwm2ISR); Interrupt_register(INT_EPWM3, &epwm3ISR); // // Disable sync(Freeze clock to PWM as well) // SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC); initEPWM1(); initEPWM2(); initEPWM3(); // // Enable sync and clock to PWM // SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC); // // Enable interrupts required for this example // Interrupt_enable(INT_EPWM1); Interrupt_enable(INT_EPWM2); Interrupt_enable(INT_EPWM3); // // Enable global Interrupts and higher priority real-time debug events: // EINT; // Enable Global interrupt INTM ERTM; // Enable Global realtime interrupt DBGM SysCtl_enableWatchdog(); // // IDLE loop. Just sit and loop forever (optional): // for(;;) { asm (" NOP"); }
然后、我以仿真模式运行、但它停止了、并且出现错误、显示"No source available for "_system_post_cinit () at C:/users\a0224194\workspace_v102\f28003x\ePWM_ex13_up_AQ\CPU1_RAM\ePWM_ex13_up_AG.out:{3}0x34"。
由于 Device_init()在开始时禁用看门狗,我们需要了解如何在此处启用看门狗。 您能帮您检查解决方案吗? 谢谢你。
Aki、
请参阅看门狗 服务示例、了解启用看门狗的正确步骤。 我将向 C2000Ware 人员重新发布此帖子、以提供有关 错误消息的更多支持。
此致、
Ozino
您好、Ozino、
如果我在 "Watchdog_ex1_service"示例中将看门狗设置为生成复位信号、我发现了报告的相同错误、并且在 for 循环中添加了 SYSCTL_serviceWatchdog 注释。
void main(void) { // // Initialize device clock and peripherals // Device_init(); // // Initialize PIE and clear PIE registers. Disables CPU interrupts. // Interrupt_initModule(); // // Initialize the PIE vector table with pointers to the shell Interrupt // Service Routines (ISR). // Interrupt_initVectorTable(); // // Re-map watchdog wake interrupt signal to call the ISR function in this // example // Interrupt_register(INT_WAKE, &wakeupISR); // // Clear the counters // wakeCount = 0; loopCount = 0; // // Set the watchdog to generate an interrupt signal or a reset signal // // SysCtl_setWatchdogMode(SYSCTL_WD_MODE_INTERRUPT); SysCtl_setWatchdogMode(SYSCTL_WD_MODE_RESET); // // Enable the watchdog wake interrupt signal // Interrupt_enable(INT_WAKE); // // Enable Global Interrupt (INTM) and realtime interrupt (DBGM) // EINT; ERTM; // // Reset the watchdog counter // SysCtl_serviceWatchdog(); // // Enable the watchdog // SysCtl_enableWatchdog(); // // Loop Forever // for(;;) { loopCount++; // // Uncomment SysCtl_serviceWatchdog to just loop here. // Comment SysCtl_serviceWatchdog to have watchdog timeout and trigger // an interrupt signal to execute the wakeupISR // // SysCtl_serviceWatchdog(); } }
Aki、
[引用 userid="370817" URL"~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1048466/tms320f280025-error-no-source-available-for-_system_post_cinit-after-enabling-watchdog。]然后、我以仿真模式运行、但它停止运行、并显示错误"在 C:/Users\a0224194\workspace_v102\f28003x\ePWM_ex13_up_264\cpu1_ex3\req_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out_out看起来正在进行复位、复位后、CPU 在引导 ROM 中停止、因为仿真引导未正确设置。 如果正确设置了仿真引导, 则复位后它应正确引导至应用程序。
此致、
Vivek Singh
Vivek、
感谢您的深入见解。 我发现如果更改 仿真 启动设置、它现在就可以工作了。 我们似乎只能在内存调试器中更改它、并且无法为 仿真 启动设置配置外设寄存器、对吧?
Aki、
[引用 userid="370817" URL"~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1048466/tms320f280025-error-no-source-available-for-_system_post_cinit-after-enabling-watchdog/3884215 #3884215"]我们似乎只能在内存调试器中更改它,并且无法为 仿真 启动设置配置外设寄存器,对吗?[/quot]没错。
此致、
Vivek Singh