2 Replies Latest reply on Apr 8, 2011 11:33 AM by udayan.umapathi

    Hardware enabled timer issue

    tommy.doerge

      I made a 'hardware only' enabled UDB timer that flashes an LED according to the attached schematic. The main() routine contains nothing but an endless loop. I can't get this to work unless I put 'Timer_1_Start()' in the main routine. According to the data sheet this should not be necessary. Any suggestions?

        • 1. Re: Hardware enabled timer issue
          udayan.umapathi

          In PSoC Design, the "Timer component " is placed on Topdesign, it's parameters are configured using the configuration GUI and necessary connections are made to connect the Timer to other components on the TopDesign. However the initial parameter set in the Timer configuration GUI, needs to be written in to appropriate registers for it's operation. This is what the Timer_1_Start() API does. Most of the components in PSoC will need this API for initialisation. However there are few exception like Pins, Control Register, Status Register, Gates etc, which do not need a start API. 

             

          As seen in the Timer datasheet the description for the Start API is, Initializes the Timer with default customizer values. Enables the Timer operation by setting the enable bit of the control register for either of the software controlled enable modes. 

             

          The API Timer_1_Start(), makes calls to multiple other functions that sets appropriate registers, the same can be seen in "Timer_1.c". 

             

          Every component on the Topdesign is associated with a component.c and component.h that has relevant definitions for the functions.

          • 2. Re: Hardware enabled timer issue
            tommy.doerge

            Many thanks. It's all very clear to me now.