K
kavinraj@atindriya.co.in
Sat, Feb 22, 2025 4:05 AM
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?
Thanks.
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?
Thanks.
MD
Marcus D. Leech
Sat, Feb 22, 2025 4:11 AM
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.
On 21/02/2025 23:05, kavinraj@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.
K
kavinraj@atindriya.co.in
Sat, Feb 22, 2025 4:22 AM
Hi,
Thanks for answering.
Can you explain me clearly?
Thanks.
On 2025-02-21 23:11, Marcus D. Leech wrote:
On 21/02/2025 23:05, kavinraj@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-leave@lists.ettus.com
Hi,
Thanks for answering.
Can you explain me clearly?
Thanks.
On 2025-02-21 23:11, Marcus D. Leech wrote:
> On 21/02/2025 23:05, kavinraj@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-leave@lists.ettus.com
MD
Marcus D. Leech
Sat, Feb 22, 2025 4:37 AM
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:
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-leave@lists.ettus.com
On 21/02/2025 23:22, kavinraj@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, kavinraj@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-leave@lists.ettus.com
K
kavinraj@atindriya.co.in
Sat, Feb 22, 2025 4:56 AM
Hi,
Can I use usleep(1) or any other technique is there for GPIO .
On 2025-02-21 23:37, Marcus D. Leech wrote:
On 21/02/2025 23:22, kavinraj@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, kavinraj@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-leave@lists.ettus.com
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-leave@lists.ettus.com
Hi,
Can I use usleep(1) or any other technique is there for GPIO .
On 2025-02-21 23:37, Marcus D. Leech wrote:
> On 21/02/2025 23:22, kavinraj@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, kavinraj@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-leave@lists.ettus.com
> _______________________________________________
> USRP-users mailing list -- usrp-users@lists.ettus.com
> To unsubscribe send an email to usrp-users-leave@lists.ettus.com
MD
Marcus D. Leech
Sat, Feb 22, 2025 5:10 AM
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:
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:
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-leave@lists.ettus.com
On 21/02/2025 23:56, kavinraj@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, kavinraj@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, kavinraj@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-leave@lists.ettus.com
>> _______________________________________________
>> USRP-users mailing list -- usrp-users@lists.ettus.com
>> To unsubscribe send an email to usrp-users-leave@lists.ettus.com
K
kavinraj@atindriya.co.in
Sat, Feb 22, 2025 11:11 AM
Hi,
How to give the delay in uhd_usrp_set_command_time(uhd_usrp_handle
h,int64_t full_secs,double frac_secs,size_t mboard) function?
On 2025-02-22 00:10, Marcus D. Leech wrote:
On 21/02/2025 23:56, kavinraj@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, kavinraj@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, kavinraj@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-leave@lists.ettus.com
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-leave@lists.ettus.com
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-leave@lists.ettus.com
Hi,
How to give the delay in uhd_usrp_set_command_time(uhd_usrp_handle
h,int64_t full_secs,double frac_secs,size_t mboard) function?
On 2025-02-22 00:10, Marcus D. Leech wrote:
> On 21/02/2025 23:56, kavinraj@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, kavinraj@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, kavinraj@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-leave@lists.ettus.com
>>> _______________________________________________
>>> USRP-users mailing list -- usrp-users@lists.ettus.com
>>> To unsubscribe send an email to usrp-users-leave@lists.ettus.com
> _______________________________________________
> USRP-users mailing list -- usrp-users@lists.ettus.com
> To unsubscribe send an email to usrp-users-leave@lists.ettus.com
MB
Martin Braun
Mon, Feb 24, 2025 6:57 AM
Hi,
How to give the delay in uhd_usrp_set_command_time(uhd_usrp_handle
h,int64_t full_secs,double frac_secs,size_t mboard) function?
On 2025-02-22 00:10, Marcus D. Leech 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:
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:
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-leave@lists.ettus.com
You don't specify a delay, you send one timed command to make the pin go
HIGH, and another timed command to make it go LOW. And the two
command-times should be "your delay" apart.
This may help:
https://www.youtube.com/watch?v=ppD06ZETnek&t=75s&pp=ygUPZ3Jjb24gdXNycCBncGlv
--M
On Sat, Feb 22, 2025 at 12:12 PM <kavinraj@atindriya.co.in> wrote:
> Hi,
> How to give the delay in uhd_usrp_set_command_time(uhd_usrp_handle
> h,int64_t full_secs,double frac_secs,size_t mboard) function?
>
>
>
>
>
>
>
>
>
> On 2025-02-22 00:10, Marcus D. Leech wrote:
> > On 21/02/2025 23:56, kavinraj@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, kavinraj@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, kavinraj@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-leave@lists.ettus.com
> >>> _______________________________________________
> >>> USRP-users mailing list -- usrp-users@lists.ettus.com
> >>> To unsubscribe send an email to usrp-users-leave@lists.ettus.com
> > _______________________________________________
> > USRP-users mailing list -- usrp-users@lists.ettus.com
> > To unsubscribe send an email to usrp-users-leave@lists.ettus.com
> _______________________________________________
> USRP-users mailing list -- usrp-users@lists.ettus.com
> To unsubscribe send an email to usrp-users-leave@lists.ettus.com
>
K
kavinraj@atindriya.co.in
Mon, Feb 24, 2025 8:45 AM
Hi,
What is the minimum time to toggle the GPIO pin?
I want to make the GPIO pin high for 1microsecond and low for
1milliseconds. How i achieve this through code?
Thanks.
On 2025-02-24 01:57, Martin Braun wrote:
You don't specify a delay, you send one timed command to make the pin
go HIGH, and another timed command to make it go LOW. And the two
command-times should be "your delay" apart.
This may help:
https://www.youtube.com/watch?v=ppD06ZETnek&t=75s&pp=ygUPZ3Jjb24gdXNycCBncGlv
--M
On Sat, Feb 22, 2025 at 12:12 PM kavinraj@atindriya.co.in wrote:
Hi,
How to give the delay in
uhd_usrp_set_command_time(uhd_usrp_handle
h,int64_t full_secs,double frac_secs,size_t mboard) function?
On 2025-02-22 00:10, Marcus D. Leech wrote:
On 21/02/2025 23:56, kavinraj@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, kavinraj@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, kavinraj@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-leave@lists.ettus.com
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-leave@lists.ettus.com
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-leave@lists.ettus.com
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-leave@lists.ettus.com
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-leave@lists.ettus.com
Hi,
What is the minimum time to toggle the GPIO pin?
I want to make the GPIO pin high for 1microsecond and low for
1milliseconds. How i achieve this through code?
Thanks.
On 2025-02-24 01:57, Martin Braun wrote:
> You don't specify a delay, you send one timed command to make the pin
> go HIGH, and another timed command to make it go LOW. And the two
> command-times should be "your delay" apart.
>
> This may help:
> https://www.youtube.com/watch?v=ppD06ZETnek&t=75s&pp=ygUPZ3Jjb24gdXNycCBncGlv
>
> --M
>
> On Sat, Feb 22, 2025 at 12:12 PM <kavinraj@atindriya.co.in> wrote:
>
>> Hi,
>> How to give the delay in
>> uhd_usrp_set_command_time(uhd_usrp_handle
>> h,int64_t full_secs,double frac_secs,size_t mboard) function?
>>
>> On 2025-02-22 00:10, Marcus D. Leech wrote:
>>> On 21/02/2025 23:56, kavinraj@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, kavinraj@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, kavinraj@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-leave@lists.ettus.com
>>>>> _______________________________________________
>>>>> USRP-users mailing list -- usrp-users@lists.ettus.com
>>>>> To unsubscribe send an email to usrp-users-leave@lists.ettus.com
>>> _______________________________________________
>>> USRP-users mailing list -- usrp-users@lists.ettus.com
>>> To unsubscribe send an email to usrp-users-leave@lists.ettus.com
>> _______________________________________________
>> USRP-users mailing list -- usrp-users@lists.ettus.com
>> To unsubscribe send an email to usrp-users-leave@lists.ettus.com
> _______________________________________________
> USRP-users mailing list -- usrp-users@lists.ettus.com
> To unsubscribe send an email to usrp-users-leave@lists.ettus.com
MB
Martin Braun
Mon, Feb 24, 2025 1:14 PM
Assuming t_high is a uhd::time_spec_t that marks the start time of your
HIGH state, simply do
auto t_low = t_high + 1e-6;
and then use t_low for your second timed command:
usrp->set_command_time(t_high);
usrp->set_gpio_attr(/* set your pin high /);
usrp->set_command_time(t_low);
usrp->set_gpio_attr(/ set your pin low */);
--M
On Mon, Feb 24, 2025 at 9:45 AM kavinraj@atindriya.co.in wrote:
Hi,
What is the minimum time to toggle the GPIO pin?
I want to make the GPIO pin high for 1microsecond and low for
1milliseconds. How i achieve this through code?
Thanks.
On 2025-02-24 01:57, Martin Braun wrote:
You don't specify a delay, you send one timed command to make the pin
go HIGH, and another timed command to make it go LOW. And the two
command-times should be "your delay" apart.
This may help:
Hi,
How to give the delay in
uhd_usrp_set_command_time(uhd_usrp_handle
h,int64_t full_secs,double frac_secs,size_t mboard) function?
On 2025-02-22 00:10, Marcus D. Leech wrote:
Hi,
Can I use usleep(1) or any other technique is there for GPIO .
You might be able to use timed commands:
But since usleep() cannot guarantee any kind of maximum period
your process will go to sleep, it is an unreliable
method when precision and repeatable timing of ANY kind of
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
bus to the external hardware, including kernel-layer
USB drivers, etc, etc.
On 2025-02-21 23:37, Marcus D. Leech 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:
Hi,
In USRP B205mini-i I am able to access the GPIO Pin. I
create a Pulse in the GPIO pin. I want to make high the gpio
for 1microsecond and low for 999microseconds. How to achieve
timings through coding. Can you give me the solution for
In coding after making high I am giving usleep(1) function
when I am check in the oscilloscope it is showing
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
per se, with UHD or USRPs, but rather, to understanding
how applications execute in a general-purpose operating
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
Assuming t_high is a uhd::time_spec_t that marks the start time of your
HIGH state, simply do
auto t_low = t_high + 1e-6;
and then use t_low for your second timed command:
usrp->set_command_time(t_high);
usrp->set_gpio_attr(/* set your pin high */);
usrp->set_command_time(t_low);
usrp->set_gpio_attr(/* set your pin low */);
--M
On Mon, Feb 24, 2025 at 9:45 AM <kavinraj@atindriya.co.in> wrote:
> Hi,
> What is the minimum time to toggle the GPIO pin?
> I want to make the GPIO pin high for 1microsecond and low for
> 1milliseconds. How i achieve this through code?
>
>
> Thanks.
>
>
>
> On 2025-02-24 01:57, Martin Braun wrote:
> > You don't specify a delay, you send one timed command to make the pin
> > go HIGH, and another timed command to make it go LOW. And the two
> > command-times should be "your delay" apart.
> >
> > This may help:
> >
> https://www.youtube.com/watch?v=ppD06ZETnek&t=75s&pp=ygUPZ3Jjb24gdXNycCBncGlv
> >
> > --M
> >
> > On Sat, Feb 22, 2025 at 12:12 PM <kavinraj@atindriya.co.in> wrote:
> >
> >> Hi,
> >> How to give the delay in
> >> uhd_usrp_set_command_time(uhd_usrp_handle
> >> h,int64_t full_secs,double frac_secs,size_t mboard) function?
> >>
> >> On 2025-02-22 00:10, Marcus D. Leech wrote:
> >>> On 21/02/2025 23:56, kavinraj@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, kavinraj@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, kavinraj@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-leave@lists.ettus.com
> >>>>> _______________________________________________
> >>>>> USRP-users mailing list -- usrp-users@lists.ettus.com
> >>>>> To unsubscribe send an email to usrp-users-leave@lists.ettus.com
> >>> _______________________________________________
> >>> USRP-users mailing list -- usrp-users@lists.ettus.com
> >>> To unsubscribe send an email to usrp-users-leave@lists.ettus.com
> >> _______________________________________________
> >> USRP-users mailing list -- usrp-users@lists.ettus.com
> >> To unsubscribe send an email to usrp-users-leave@lists.ettus.com
> > _______________________________________________
> > USRP-users mailing list -- usrp-users@lists.ettus.com
> > To unsubscribe send an email to usrp-users-leave@lists.ettus.com
>