On 21/02/2025 23:56, kavin...@atindriya.co.in wrote:
Hi,
Can I use usleep(1) or any other technique is there for GPIO .
You might be able to use timed commands:
https://files.ettus.com/manual/page_timedcmds.html#timedcmds_gen_cmds
But since usleep() cannot guarantee any kind of maximum period that your
process will go to sleep, it is an unreliable
method when precision and repeatable timing of ANY kind of "doing
stuff with external hardware" is required. Even if
usleep() at microsecond-scale intervals *WAS* reliable and
repeatable, there's no guarantee about all the *other* things
that are required to launch a command over a latency-not-guaranteed
bus to the external hardware, including kernel-layer
USB drivers, etc, etc.
On 2025-02-21 23:37, Marcus D. Leech wrote:
On 21/02/2025 23:22, kavin...@atindriya.co.in wrote:
Hi,
Thanks for answering.
Can you explain me clearly?
Thanks.
I'd suggest, at a minimum, looking at the MAN page for usleep().
On 2025-02-21 23:11, Marcus D. Leech wrote:
On 21/02/2025 23:05, kavin...@atindriya.co.in wrote:
Hi,
In USRP B205mini-i I am able to access the GPIO Pin. I have to
create a Pulse in the GPIO pin. I want to make high the gpio pin
for 1microsecond and low for 999microseconds. How to achieve this
timings through coding. Can you give me the solution for this?
In coding after making high I am giving usleep(1) function but
when I am check in the oscilloscope it is showing 64microseconds.
How?
Because an application-land program executing on an ordinary
general-purpose operating system is unlikely to be able to
achieve repeatable, 1usec-scale timing. This has nothing to do,
per se, with UHD or USRPs, but rather, to understanding
how applications execute in a general-purpose operating system
that isn't ruthlessly optimized for "hard" real-time tasks.
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com