• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » C6000 Multicore DSP » Keystone Multicore Forum (C66, 66A, AM5) » Need a example of timer in watchdog mode on evm6678
Share
C6000 Multicore DSP
  • Forums
  • Announcements
Options
  • Subscribe via RSS
Training Available
TI provides self-paced online training that introduces the primary components of the KeyStone II family of SoC devices.

  • KeyStone II SoC Overview >
  • KeyStone II Software Overview >
  • KeyStone II ARM Cortex-A15 Corepac Overview >
  • More Information >
  • Check out
    Multicore Mix blog
    • $core_v2_blog.Current.Name

      It’s our second anniversary, but you get the present!

      Posted 6 days ago
      by Lindsey Bare
      It’s hard to believe it’s already been two years...
    • $core_v2_blog.Current.Name

      Limited time offer: Save $100 on Keystone-based EVM!

      Posted 19 days ago
      by tscheck
      Have you been thinking about ordering a TI Keystone-based EVM...
    • $core_v2_blog.Current.Name

      Imagine the impact…TI’s KeyStone SoC + HP Moonshot

      Posted 30 days ago
      by Sanjay35057
      Last week, market leader Hewlett Packard announced a huge change...

    Need a example of timer in watchdog mode on evm6678

    Need a example of timer in watchdog mode on evm6678

    This question is answered
    xiang_li
    Posted by xiang_li
    on Aug 23 2012 02:13 AM
    Intellectual925 points

    Hi all,

    I need a example of timer (in watchdog mode is better) on evm6678. I searched pdk for it,but it seems haven`t.

    Do you have some example?I need it.

    Thanks.

    Li

    Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.

    6678 timer
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Chad Courtney
      Posted by Chad Courtney
      on Aug 23 2012 14:46 PM
      Verified Answer
      Verified by xiang_li
      Mastermind22515 points

      There's one in the PDK.

      C:\ti\pdk_C6678_x_x_x_x\packages\ti\csl\example\timer

      Best Regards,

      Chad

      ------------------------------------------------------------------------------------------------------------

      Please click the Verify Answer button on this post if it answers your question.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • xiang_li
      Posted by xiang_li
      on Aug 23 2012 19:27 PM
      Verified Answer
      Verified by xiang_li
      Intellectual925 points

      Hi chad,

      Thank you.It is very helpful.

      With Best Regards,

      Li

      Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • xiang_li
      Posted by xiang_li
      on Aug 23 2012 21:33 PM
      Intellectual925 points

      Hi Chad,

      I tired to use the .c file and cmd, but my new project is not work, maybe I config is wrong when i create it.

      Can you help me for create a new usable test project with the two file?

      Thanks,

      Li

      Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Chad Courtney
      Posted by Chad Courtney
      on Aug 24 2012 10:25 AM
      Mastermind22515 points

      Not sure what the issue is w/o seeing the compiler outputs.

      The .cmd file in the directory looks fine.

      Looking at the code, the pathing for the include files look fine, but you'd need to have the include path in the project to get to the STDIO and the PDK Package so it will get these headers.

      #include <stdio.h>
      #include <string.h>
      #include <ti/csl/csl_tmr.h>
      #include <ti/csl/csl_tmrAux.h>
      #include <ti/csl/src/intc/csl_intc.h>
      #include <ti/csl/src/intc/csl_intcAux.h>

      Best Regards,

      Chad

      ------------------------------------------------------------------------------------------------------------

      Please click the Verify Answer button on this post if it answers your question.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • xiang_li
      Posted by xiang_li
      on Aug 24 2012 10:39 AM
      Intellectual925 points

      Hi chad,

      I have tried it like you said, but it did`t work,

      compiler told me some Fxn undefined (like IntcOpen IntcClose etc),

      but i have included these header file and set search path,even add 66lib

      so i`m confuse...

      Can you try it? Thanks.

      Best Regards,

      LI

      Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Chad Courtney
      Posted by Chad Courtney
      on Aug 24 2012 10:43 AM
      Mastermind22515 points

      I'll have someone from my team try and and get back to you on the forum.

      Best Regards,
      Chad

      ------------------------------------------------------------------------------------------------------------

      Please click the Verify Answer button on this post if it answers your question.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Katherine Kelsch
      Posted by Katherine Kelsch
      on Aug 24 2012 13:58 PM
      Verified Answer
      Verified by xiang_li
      Intellectual1185 points

      HI Li, 

       I can see you're having some problems and am happy to help. From what I can tell in your CCS setup is that you have your path included in your C6000 linker and compiler (which you can see in detail from your CCS project preferences). Since you said you have your header files and search path set correctly, what you're probably missing is the library for the intc (interrupt controller) function definition. You should need two libraries for this example. 

        So, if I am using the ti.csl.ae66 library (C:\ti\pdk_C6678_xxx\packages\ti\csl\lib) , I also need the ti.csl.intc.ae66 library included as well. You can include this in the "File Search Path" portion of CCS project preferences. It will be under "C6000 Linker". 

      I hope this solves this problem for you. If you have any other questions feel free to ask again!

      Regards, 

      Kat Kelsch

      ---------------------------------------------------------------------------------------------------------

      Please click the Verify Answer button on this post if it answers your question.

      ____________________________________________________________

      CCS intc library
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • xiang_li
      Posted by xiang_li
      on Aug 26 2012 22:20 PM
      Verified Answer
      Verified by xiang_li
      Intellectual925 points

      HI Kat,

      Thank you for your answer.It is right.I used the two library and then the problem resolved.

      I want to use the timer watchdog mode.

      I have two question for the code:

      Q1:

      in this Function    static Int32 test_wd_timer (Uint8 IntcInstance)


      /* Wait for the timer interrupts to fire; since the watchdog timers run continuously
      * we wait for at least 5 interrupts to fire... */
      while (timerISRCounter != 5);

      I only get timerISRCounter =1 in watchwindow(called Expressions in v3.3),and wait for ever.

      I think When the wd send a interrupt.It will be disable.so the timerISRCounter =1.It`s right?

      Why the code is 5?

      Q2:the register CNTLO and CNTHI at 0x02200010 and 0x02200014, i think it wil add 1 by 1.But it still remain 0.Why?

      Thanks,

      Li

      Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • xiang_li
      Posted by xiang_li
      on Aug 27 2012 00:42 AM
      Intellectual925 points

      Hi kat

      I saw TIMER64P_UG.paf .    

      It said After entering the timeout state,the watchdog timer cannot be enabled again until a hardware reset occurs.

      is it the one reason of My question?

      I think the chip will reset and the project will be disconnect, is it right?

      Thanks,

      Li

      Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Chad Courtney
      Posted by Chad Courtney
      on Aug 27 2012 09:22 AM
      Verified Answer
      Verified by xiang_li
      Mastermind22515 points

      Li,

      You can perform a Soft Reset, please see the Data Manual for details.  This will not disconnect the emulation and it will not invalidate the memory.

      Best Regards,

      Chad

      ------------------------------------------------------------------------------------------------------------

      Please click the Verify Answer button on this post if it answers your question.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Katherine Kelsch
      Posted by Katherine Kelsch
      on Aug 27 2012 11:09 AM
      Verified Answer
      Verified by xiang_li
      Intellectual1185 points

      Hi Li, 

      Let's do this question by question. 

      Q1: Once the device is stuck in timeout state, you will need to do a hardware reset in order to enable the timer. You're correct about that. You will terminate the CCS session (you can just click the red square in your CCS debug session) and it will disconnect the project. You won't hardware reset until you turn your EVM on and off or press the reset button. Then you can relaunch your debug session and start over. Your other option is of course the soft reset, as Chad said. 

      You're also correct in that the timer is stuck waiting for the other interrupts to happen. This means that there is something wrong with your setup that would cause the interrupts to not communicate. Check and see if you can find what that is. 

      Q2: You're right, those two registers should increase 1 by 1. However, since the system gets stuck before hand at the interrupt. It will never be able to increase since it is paused before it gets to that point in the code. 

      Regards, 

      Kat Kelsch

      ---------------------------------------------------------------------------------------------------------

      Please click the Verify Answer button on this post if it answers your question.

      ____________________________________________________________

      Timer
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • xiang_li
      Posted by xiang_li
      on Aug 27 2012 22:20 PM
      Verified Answer
      Verified by xiang_li
      Intellectual925 points

      Hi kat,

      Thanks for your reply seriously.

      I`m sure my config is right as sprugv5a_KeyStone_Arch_TIMER64P_UG.pdf said.

      watchdog mode,PLUS mode,PLUS wide = 3 or 4,no gated clock,no external clock,no one-time enabling etc.

      It seems the problem of watchdog proccess.

      Q1:In initial statue, I enable the wd and key A5C6h to WDKEY,we are into pre-active state.That is right.

      And then,the problem is occured.

      Write DA7Eh to WDKEY.it should into Active state(In the state, we are waiting for A5C6h).

      That means the counter still remain 0 if I didn`t write A5C6h to WDKEY. I`m right?

      The fact is when I have write A5C6h and DA7Eh  first time.(It should into Active state and wait A5C6h)

      But it start counting. It make me confused.

      Q2:I think the watchdog timer can realize hard reset, soft reset and,local reset.as the following image

      Q3:I think I can answer the reason of  I get only one interrupt.

      Because when the timeout occuerd, the WDFLG is set 1 and WDEN is 0,

      and I think the watchdog can`t enable again if no hard reset happened.

      I think the change between Active state from Service state,it can be called kick dog.

      I`m so embarrassed,because i just leave university to working only three months,

      so I told something maybe wrong,Please tell me directly.Thanks.

      Best Regards,

      Li

      Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • xiang_li
      Posted by xiang_li
      on Aug 27 2012 22:30 PM
      Intellectual925 points

      Hi Chad,

      I feel confuse about how to make timer-watchdog mode realize soft reset / hard reset / Local reset.

      The Manual describe the different of these.

      But I feel it is not detailed about realize them.

      And For example,If i want to use soft reset,I must set 1 at WDTYPE[N] in RSTCFG (PLL register),

      I have tried it,but the bit can`t be written like only read,though it is  R/W. 

      The code about interrupt like this:

      /* Open INTC */
      vectId = CSL_INTC_VECTID_12;
      tmrIntcHandle = CSL_intcOpen(&tmrIntcObj, CSL_GEM_TINTLN, &vectId, NULL);
      if (tmrIntcHandle == NULL)
      return -1;

      /* Bind ISR to Interrupt */
      EventRecord.handler = (CSL_IntcEventHandler)&WatchDogTimerHandler;
      EventRecord.arg = (void *)CSL_GEM_TINTLN;
      CSL_intcPlugEventHandler(tmrIntcHandle, &EventRecord);

      /* Event Enable */
      CSL_intcHwControl(tmrIntcHandle, CSL_INTC_CMD_EVTENABLE, NULL);

      Best Regards,

      Li

      Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.

      Timer
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Katherine Kelsch
      Posted by Katherine Kelsch
      on Aug 28 2012 12:29 PM
      Verified Answer
      Verified by xiang_li
      Intellectual1185 points

      Hi Li,

      Q1: You're right, it should not start couting until it receives the watchdog key "A5C6h". You said "That fact is when I have write A5C6h and DA7EH", if you did write those, it should start counting, if you did not write those, it should remain 0 and go into the Time Out state. However, you may have accidently written to it the A5C6h value it needs.  

      Q2: For your purposes any of the resets would work, but you may prefer some over the others since you won't have to reconnect to CCS and power down your device.

       

      Q3: Don't feel embarrassed. This term to alert the watch dog is commonly called "kick the dog" or "wake up the dog" and other terms. It is clear that you are only getting one interrupt and the code is waiting for 5. The reason the code does not get another interrupt is that the WDEN (watch dog enabled) is 0, or disabled. So the other 4 interrupts are not sent. It cannot be enabled again until a reset.

       

      Kat.

      ---------------------------------------------------------------------------------------------------------

      Please click the Verify Answer button on this post if it answers your question.

      ____________________________________________________________

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • xiang_li
      Posted by xiang_li
      on Aug 28 2012 21:34 PM
      Intellectual925 points

      Hi Kat,

      Tanks for your reply.

      Q1:About the Q1, I said"That fact is when I have write A5C6h and DA7EH at first time ", it means if the process of the State Diagram is correct,

      it should still remain 0 at Active statue,and wait my key"A5C6h",But now it is counting.

      I note From Active statue to Timeout state have a timeout process,

      so I doubt when WD into Active statue,it counting immediately. Because if it is not like i said, WD How to know when the timeout occurred.          

      Q2:Today, I use SWRST at PLL RSTCTRL register, implement software reset in my WD interrupt routine. It looks like system reset of CCS.

      But use  WDTYPE at PLL RSTCFG register is not work.

      And i think implement any reset can depend on timer output pin,not only interrupt. I`m not sure the output pin have connected to RESET pin?


      Q3:Have you run the example (pdk_C6678_x_x_x_x\packages\ti\csl\example\timer)?the Function about WD is work well(into 5 times interrupt routine)?

      I think it maybe can`t pass the test . Because if WD into time statue, it will be disable until a hardware reset (like Power on level reset)occurs.so how to into

      interrupt 5 times?

      Q4:Do you have some example about soft/hard/local reset? Or Anybody have do this from your team?

      I have search many times in E2E,but no body do this on EVM6678.

      I feel i implement the soft reset way which is not TI design way, and have no idea about this.

      Thanks,

      Li

      Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.

      timer watchdog
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    12
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use