AnsweredAssumed Answered

Hardware watchdog

Question asked by dale rodda on Sep 16, 2011
Latest reply on Sep 16, 2011 by David E Seymour

Hi

I am looking to get a hardware watchdog going on a MQX 3.7 MJ51 project. As I understand it the example \ watchdog project is software based.

 

Looking through some of the header files I modiefied bsp_int.c as follows.

 

 // no define for setting cop to 1/4 second
        reg_ptr->SIM.SOPT1 = MCF51XX_SOPT1_STOPE_MASK | MCF51XX_SOPT1_WAITE_MASK | 0x80;
 
      reg_ptr->SIM.SOPT2 = 0;
      /*
       * Add Low voltage detect enable and low voltage detect reset enable
       */
      reg_ptr->PMC.SPMSC1 = MCF51XX_PMC_SPMSC1_LVDE | MCF51XX_PMC_SPMSC1_LVDRE | MCF51XX_PMC_SPMSC1_LVDACK;
   
      reg_ptr->PMC.SPMSC2 = 0;

      /* INTC_WCR: ENB=1,MASK=0 */
      reg_ptr->INTC.WCR = MCF51XX_INTC_WCR_ENB;
     

and added this to one of my tasks

 

      reg_ptr->SIM.SRS = 0x55;
      reg_ptr->SIM.SRS = 0xAA;

 

 

It compiles but I do not have working hardware at home and can not test this. Any one know if this will work, or a better way to do this?

 

Also, anyone know why Freescale does not support the hardware watchdog?

 

thanks

 

Outcomes