How to delay microsecond

cuongle
Posts: 2
Joined: Wed Mar 08, 2017 6:42 am

How to delay microsecond

Postby cuongle » Sat Mar 11, 2017 1:36 am

Hi all, I'm a new member.
I want to read analog signal via adc with sample rate about 48khz so when I read via adc and delay about 20us. But I can't find the way how to delay microsecond in esp-idf. Please help me!
Thanks all so much.

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: How to delay microsecond

Postby kolban » Sat Mar 11, 2017 5:39 am

It might be that the function called "ets_delay_us(value)" is what you could use. Its proto type is defined in <rom/ets_sys.h>.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

cuongle
Posts: 2
Joined: Wed Mar 08, 2017 6:42 am

Re: How to delay microsecond

Postby cuongle » Mon Mar 13, 2017 9:02 am

kolban wrote:It might be that the function called "ets_delay_us(value)" is what you could use. Its proto type is defined in <rom/ets_sys.h>.
I have done it by your support. Thank you so much.

Who is online

Users browsing this forum: Google [Bot] and 138 guests