工具/软件:
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.
工具/软件:
您好、
Unknown 说:at watchdog timer overflow time->调试暂停。 我认为 MCU 应该被重置。
调试被暂停意味着什么? 您是否暂停了?
之类的任务Unknown 说:当我只使用 USB 电缆为 LaunchPad 上电但不使用调试模式时、MCU 不会执行任何诸如切换引脚
您是否正确设置了引导模式、以便设备通过重置循环并引导至应用程序? 有关更多详细信息、请参阅"Bootrom"一章
是任何在无调试模式下使用 LaunchPad 且 MCU 仅通过为电路板供电即可正常工作的方法。
无论是否有调试器看门狗、看门狗的工作原理都是一样的。 对于以下调试模式看门狗行为、需要牢记一些注意事项:
谢谢
" 你说什么?"侯龙涛一皱眉,问道。 您是否暂停了?
Deepak:不、我不会暂停处理。 当看门狗计时器溢出以复位 MCU 时、C28xx_CPU1自动从运行状态变为停止状态。
//############################################################################# // // FILE: empty_driverlib_main.c // //! \addtogroup driver_example_list //! <h1>Empty Project Example</h1> //! //! This example is an empty project setup for Driverlib development. //! // //############################################################################# // // // $Copyright: // Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the // distribution. // // Neither the name of Texas Instruments Incorporated nor the names of // its contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // $ //############################################################################# // // Included Files // #include "driverlib.h" #include "device.h" #include "board.h" #include "c2000ware_libraries.h" // // Globals // uint32_t wakeCount; uint32_t loopCount; // // Function Prototypes // __interrupt void wakeupISR(void); // // Main // 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(); // // PinMux and Peripheral Initialization // Board_init(); // // C2000Ware Library initialization // C2000Ware_libraries_init(); // // 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 real time interrupt (DBGM) // EINT; ERTM; // // Reset the watchdog counter // SysCtl_serviceWatchdog(); GPIO_writePin(myGPIO_OUT5, 1); // // Enable the watchdog // SysCtl_enableWatchdog(); while(1) { loopCount++; if(loopCount>500) GPIO_writePin(myGPIO_OUT5, 0); //GPIO_togglePin(myGPIO_OUT5); if(loopCount<1000) { DEVICE_DELAY_US(12000); SysCtl_serviceWatchdog(); } else if(loopCount>=1000) DEVICE_DELAY_US(15000); // // 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(); } } // // Wakeup ISR - The interrupt service routine called when the watchdog // triggers the wake interrupt signal // /* __interrupt void wakeupISR(void) { wakeCount++; if(wakeCount>1000) SysCtl_setWatchdogMode(SYSCTL_WD_MODE_RESET); // // Acknowledge this interrupt located in group 1 // Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1); } */ // // End of File //
Prathan Bhatt 说: 您是否正确设置了引导模式、使设备通过重置循环并引导至应用程序? 有关更多详细信息、请参阅"Bootrom"一章?
Deepak:-我将引导模式用作闪存。就像我在 F2800137 LaunchPad 上 S3的两个跳线(GPIO24、GPIO32)上切换一样。
感谢您的反馈、
Deepak
c28xx_CPU1在看门狗计时器溢出以复位 MCU 时自动从运行状态变为停止阶段。
好的、它在重置矢量上吗?
这看起来像因为调试器已连接、您需要将仿真引导模式设置为闪存。
谢谢