Jump to content
43oh

prabuselva

Members
  • Content Count

    5
  • Joined

  • Last visited

Posts posted by prabuselva

  1. Hai,

    try this code in CC3220SF internal Watchdog timer program, its working Fine

    #include <inc/hw_types.h>
    #include <inc/hw_ints.h>
    #include <inc/hw_memmap.h>
    #include <driverlib/prcm.h>
    #include <driverlib/wdt.h>
    #include <driverlib/rom.h>
    #include <driverlib/rom_map.h>
    #include <driverlib/interrupt.h>


    int Cycles;
    #define WD_PERIOD_MS                 1000
    #define MAP_SysCtlClockGet           80000000
    #define MILLISECONDS_TO_TICKS(ms)    ((MAP_SysCtlClockGet / 1000) * (ms))

    void setup()
    {
      Serial.begin(115200);
      Serial.println("Watchdog Test");
      MAP_PRCMPeripheralClkEnable(PRCM_WDT, PRCM_RUN_MODE_CLK);
      MAP_WatchdogUnlock(WDT_BASE);
      MAP_IntPrioritySet(INT_WDT, INT_PRIORITY_LVL_1);
      MAP_WatchdogIntRegister(WDT_BASE, &WatchdogIntHandler);
      MAP_WatchdogReloadSet(WDT_BASE, MILLISECONDS_TO_TICKS(WD_PERIOD_MS));
      MAP_WatchdogEnable(WDT_BASE);
    }

    void loop()
    {
      Serial.println("Watchdog Test");
      delay(2000);
    }


    void WatchdogIntHandler(void)
    {
      if (Cycles >= 10)
      {
        Serial.println("Reseting..........");
        return;
      }
      MAP_WatchdogIntClear(WDT_BASE);
      Cycles++;
    }

     

    Thanks

    Prabuselva

     

  2. Dear kannan,

    try this code it's working fine with cc3220sf, this code reset your device when Cycles increase greater than 10, 

    #include <stdio.h>
    #include <stdint.h>
    #include <inc/hw_types.h>
    #include <inc/hw_ints.h>
    #include <inc/hw_memmap.h>
    #include <driverlib/prcm.h>
    #include <driverlib/wdt.h>
    #include <driverlib/rom.h>
    #include <driverlib/rom_map.h>
    #include <driverlib/interrupt.h>
     

    volatile unsigned long Cycles;
    #define WD_PERIOD_MS                 1000
    #define MAP_SysCtlClockGet           80000000

    #define MILLISECONDS_TO_TICKS(ms)    ((MAP_SysCtlClockGet / 1000) * (ms))

    void setup()
    {
          Serial.begin(115200);
          Serial.println("Watchdog Test");
        MAP_PRCMPeripheralClkEnable(PRCM_WDT, PRCM_RUN_MODE_CLK);
        MAP_WatchdogUnlock(WDT_BASE);
        MAP_IntPrioritySet(INT_WDT, INT_PRIORITY_LVL_1);
        MAP_WatchdogIntRegister(WDT_BASE,&WatchdogIntHandler);
        MAP_WatchdogReloadSet(WDT_BASE,MILLISECONDS_TO_TICKS(WD_PERIOD_MS));
        MAP_WatchdogEnable(WDT_BASE);
    }

    void loop()
    {
      Serial.println("Watchdog Reset test");

     delay(2000);
    }


    void WatchdogIntHandler(void)
    {
        Serial.println("Watch rest");
        Serial.println(Cycles);
        if(Cycles>=10)
        {
          Serial.println("Reseting..........");
          return;
        }
        MAP_WatchdogIntClear(WDT_BASE);
        Cycles++;

    }

  3. hai all,

    i will working to CC3220SF launchpad

    i will try to interface at Load cell using Hx711 Amplifier 

    i have some error will be occur , how to resolve this issue

    any one work hx711 at CC3220SF or Any launchpad 

    Please Share the Library file. and One Wire Digital Temperature Sensor - DS18B20 working source code 

    Thanks 

    Selva

×
×
  • Create New...