how to set timer delay below 10 ms!?

8 posts / 0 new
Last post
Anonymous (not verified)
how to set timer delay below 10 ms!?

Hi,

I want to set DA14580's timer delay for 5 ms, so that I can get samples every 5ms. As I have studied DA14580's SDK, the only way to set timer is to use ke_timer_set function which is located in the kernel timer library. However, the time unit for setting timer is 10ms (can't set a timer with 5ms delay) and also there is no way to change this function. I'm wondering how i can set a timer with 5ms delay?

Thanks for your help in advance.

RvA
Offline
Last seen:2 weeks 3 days ago
工作人员
加入:2014-02-07 14:10
Hi Reza,

Hi Reza,

the documentUM-B-004 DA14580 Peripheral Drivers V1.1.pdfgives more info on the use of timers.

Best regards, RvA

sbourahla
Offline
Last seen:5 years 6 months ago
Expert
加入:2015-02-25 09:51
Hi RvA,

Hi RvA,

Yeah I have the same question, but can you explain how we can do for have a microseconds delay function ? I try to do this with the Timer0 but unfortunately I am not able to understand how to set the timer correctly for have a delay function in us.

I configure the timer for 2 Mhz (so 0.5us) and set the "ON" Value timer to 2 with interruption. It doesn't work ...

Any ideas ?

Best regards,

reza.yazdani67 (not verified)
Hi RvA,

Hi RvA,
Thanks for your reply. I searched for this document you mentioned but unfortunately I can't find the link to download the pdf. Could you please send me the link for downloading UM-B-004? Thanks.
The information of the page which I will be directed by searching this document is as follows:

Description:
Updated 21/7/14

Version date:
Monday, July 21, 2014
Version number:
1.1
Resource type:
Documentation
Keywords:
Peripheral GPIO EEPROM ADC PWM SPI UART
Subscribe

JE_Dialog
Offline
Last seen:4 hours 21 min ago
工作人员
加入:2013-12-05 14:02
Please download from the

Please download from the download icon on right hand side that is in the 'documents tab' within the product folder.

BR JE_Dialog

reza.yazdani67 (not verified)
Hi RvA,

Hi RvA,
I found something about how to set timer0 manually using its registers such as TIMER0_CTRL_REG, TIMER0_ON_REG. In order to enable its interrupt I know that I have to use NVIC_EnableIRQ(SWTIM_IRQn), however I don't know where to find its service routine!? Can you help me? Thanks.

reza.yazdani67 (not verified)
Thanks JE_Dialog. I go to the

Thanks JE_Dialog. I go to the path you mentioned, but I don't have the permission to access that document. I sent a request to get the acceptance for this document. I will be grateful if you accept the agreement sooner, so that I can have my problem solved. Thanks

JE_Dialog
Offline
Last seen:4 hours 21 min ago
工作人员
加入:2013-12-05 14:02
HI Reza, yes, you need to

HI Reza, yes, you need to have accepted the SLA for the SDK to access documents with a padlock. Someone will approve that for you in near future.

BR JE_Dialog