Forums - CSR1010 / Delay

4 posts / 0 new
Last post
CSR1010 / Delay
chodoohyun
Join Date: 6 Jun 16
Posts: 10
Posted: Sun, 2016-06-12 21:25

hi everyone.

 'TimerCreate(800,NULL ,NULL ) ; '   is this operates like a Delay?

if it's right first parameter value '800' means 800ms ?

if it is wrong how do i give Delay?

 

pleae help me.

  • Up0
  • Down0
Dr. Nissim Zur
Profile picture
Join Date: 6 Jun 16
Location: Skype: nissim.test CSR1010 External design house
Posts: 235
Posted: Sun, 2016-06-12 22:26

chodoohyun, Never use delays in your application. CSR1010 is single thread system and delay will break your system. Delay more than 30 sec will reset the chip. TimerCreate is calling procedure after the time expired.

See demo x:\CSR_uEnergy_SDK-2.6.0.10\apps\timers

/

 
/*----------------------------------------------------------------------------*
 *  TimerCreate
 */
/*! \brief Insert an application timer into the timer queue.
 *
 * The timeout period is measured in microseconds. time.h defines a number of
 * constants for #MILLISECOND, #SECOND and #MINUTE, e.g. allowing 10*SECOND to
 * be used when starting a timer. Note that although the timeout value is a
 * 32-bit number the maximum timeout period is actually 35 minutes to enable
 * safe 'roll over' handling. #MAX_TIMER_PERIOD defines this value.
 *
 * When the timer expires, the firmware will call the application timer handler
 * function. Prior to calling the handler, the firmware will have "cleaned up"
 * the timer structure, therefore the application does not need to manually
 * delete the timer. If the application needs to restart the timer (for the
 * same or a different duration) it can simply call TimerCreate() again.
 *
 *  \param time The number of microseconds the timer should run for.
 *  \param relative True => time is offset from "now".
 *  \param handler Pointer to the expiry callback function.
 *
 *  \return Timer reference, or TIMER_INVALID if the timer could not be started.
 */
/*---------------------------------------------------------------------------*/
  • Up0
  • Down0
Re: CSR1010 / Delay Best Answer
chodoohyun
Join Date: 6 Jun 16
Posts: 10
Posted: Sun, 2016-06-12 23:52

thanks you very much Nissim 

plese help me one more thing.

can you link 'CSR_uEnergy_SDK-2.6.0.10 demo code ' download page? 

i tried to find that but fail...

  • Up0
  • Down0
ywinge Moderator
Join Date: 3 Sep 15
Posts: 1
Posted: Mon, 2016-06-13 02:41

Hi Chodoohyun we cannot post the link on a public forum but if you have previously registered on CSR Support please log in and you will be able to view and access the SDK download. 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.