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.

CCS/CC3200: CC3200 capture mode

Part Number: CC3200

Tool/software: Code Composer Studio

I want count the external event up to the buffer overflow afterwards Create the Interrupt 

  • If any demo code is available for that plz send me here..
  • Hi Kiran,

    Please view the CC3200 Timer Count Capture example. processors.wiki.ti.com/.../CC3200_Timer_Count_Capture_Application

    Best regards,
    Kristen
  • I know this example but It just generate the interupt at frst squr pulse I want interrupt when the 16/32 bit buffer getting full.

  • This code is for time-capture mode but I want – 16-bit input-edge count 

  • //*****************************************************************************

    // Driverlib includes
    #include "hw_types.h"
    #include "hw_ints.h"
    #include "hw_memmap.h"
    #include "interrupt.h"
    #include "prcm.h"
    #include "gpio.h"
    #include "utils.h"
    #include "timer.h"
    #include "rom.h"
    #include "rom_map.h"
    #include "pin.h"

    // Common interface includes
    #include "uart_if.h"
    #include "pinmux.h"


    #define APPLICATION_VERSION "1.1.1"
    #define APP_NAME "Timer Count Capture"
    #define TIMER_FREQ 80000000

    //*****************************************************************************
    // GLOBAL VARIABLES -- Start
    //*****************************************************************************
    static unsigned long g_ulSamples[2];
    static unsigned long g_ulFreq;
    static unsigned long c;

    #if defined(ccs) || defined(gcc)
    extern void (* const g_pfnVectors[])(void);
    #endif
    #if defined(ewarm)
    extern uVectorEntry __vector_table;
    #endif
    //*****************************************************************************
    // GLOBAL VARIABLES -- End
    //*****************************************************************************


    //*****************************************************************************
    //
    //! Timer interrupt handler
    //
    //*****************************************************************************
    static void TimerIntHandler()
    {
    //
    // Clear the interrupt
    //
    MAP_TimerIntClear(TIMERA2_BASE,TIMER_CAPA_MATCH);
    c++;
    Report("In ISR: %d Value: 0x%x \n\r",c, MAP_TimerValueGet(TIMERA2_BASE,TIMER_A));
    //
    }


    //*****************************************************************************
    //
    //! Application startup display on UART
    //!
    //! \param none
    //!
    //! \return none
    //!
    //*****************************************************************************
    void
    DisplayBanner(char * AppName)
    {

    Report("\n\n\n\r");
    Report("\t\t *************************************************\n\r");
    Report("\t\t\t CC3200 %s Application \n\r", AppName);
    Report("\t\t *************************************************\n\r");
    Report("\n\n\n\r");
    }

    //*****************************************************************************
    //
    //! Board Initialization & Configuration
    //!
    //! \param None
    //!
    //! \return None
    //
    //*****************************************************************************
    void
    BoardInit(void)
    {
    /* In case of TI-RTOS vector table is initialize by OS itself */
    #ifndef USE_TIRTOS
    //
    // Set vector table base
    //
    #if defined(ccs) || defined(gcc)
    MAP_IntVTableBaseSet((unsigned long)&g_pfnVectors[0]);
    #endif
    #if defined(ewarm)
    MAP_IntVTableBaseSet((unsigned long)&__vector_table);
    #endif
    #endif
    //
    // Enable Processor
    //
    MAP_IntMasterEnable();
    MAP_IntEnable(FAULT_SYSTICK);

    PRCMCC3200MCUInit();
    }


    //*****************************************************************************
    //
    //! Main Function
    //
    //*****************************************************************************
    int main()
    {

    //
    // Initialize Board configurations
    //
    BoardInit();

    //
    // Pinmux for UART
    //
    PinMuxConfig();

    //
    // Configuring UART
    //
    InitTerm();

    //
    // Display Application Banner
    //
    DisplayBanner(APP_NAME);

    //
    // Enable pull down
    //
    MAP_PinConfigSet(PIN_15,PIN_TYPE_STD_PD,PIN_STRENGTH_6MA);


    //
    // Register timer interrupt hander
    //
    MAP_TimerIntRegister(TIMERA2_BASE,TIMER_A,TimerIntHandler);

    //
    // Configure the timer in edge count mode
    //
    MAP_TimerConfigure(TIMERA2_BASE, (TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_CAP_COUNT_UP));

    //
    // Set the detection edge
    //
    MAP_TimerControlEvent(TIMERA2_BASE,TIMER_A,TIMER_EVENT_POS_EDGE);//

    //
    // Set the reload value/* *******/
    //
    MAP_TimerMatchSet(TIMERA2_BASE,TIMER_A,0xFFFE);


    //
    // Enable capture event interrupt
    //
    MAP_TimerIntEnable(TIMERA2_BASE,TIMER_CAPA_MATCH);

    //
    // Enable Timer
    //
    MAP_TimerEnable(TIMERA2_BASE,TIMER_A);


    while(1)
    {


    }