BBB uarts & pps dts definitions
Tony Hain
tony at tndh.net
Fri Jan 27 06:23:53 UTC 2017
Ian Lepore wrote:
> > > > snip
> > > > This is so close, there must be something really trivial that I am
> > > > overlooking...
> > > >
> > > > Tony
> > > I'm using a 5v->3.3v level shifter right now, but I have in the past
> > > succesfully used resistive dividers. My PPS output device is
> > > designed to drive 5v into a 50 ohm load, so when using a divider I
> > > just try various values I have handy until my scope says the voltage
> > > high level is somewhere in the 2.8-3.3v range. Usually I use
> > > resistance that adds up to somewhere between 40-100 ohms when I do
> > > that (depends on what resistors pop out first when I reach into the
> > > bag of loosies).
> > >
> > > -- Ian
> > That makes some degree of sense based on what I am seeing, though that
> > is a very low input impedance on the BBB. I was expecting ~100k. My
> > source is a
> > 555 on an ancient ttl/RS232 board I built because the 20 us pulse from
> > the GPS was too fast (between the slew rate of the 3232 and the DCD
> > detection window on the com port) to go with a simple level
> > conversion. Sounds like it might be best to do an active 3.3v driver
> > at this point.
> >
> > Tony
> >
>
> Well you were right, it all boiled down to electrical trouble, but it was
caused
> by software, and I just committed a fix as r312859. I'll MFC the fix to
11 in a
> few days (you could just grab the patch/source from -current and build a
> new kernel now).
>
> Even though the code was asking the pinmux driver to configure the pin as
> an input, there is also a bit in the timer control register that
configures the pin
> as input or output for capture vs. pulse mode. That setting apparently
> overrides the pinmux choice, so the timer block was driving a signal onto
that
> pad. (The code had a comment next to one bit in the control register
defines
> "no description in datasheet".
> That goes back to the original timer driver from years ago. A newer copy
of
> the manual is where I discovered that the bit is now described as
> input/output config.)
>
> I think my testing was working because my level-shifter was able to out-
> muscle the weaker drive in the TI chip. As soon as I switched to a
passive
> voltage divider it stopped working. Now with the pin configured correctly
it
> works fine for me, and probably will for you too.
>
> I find that it captures pulses as narrow as 100nS perfectly now. A 10nS
pulse
> it captures maybe 35% of the time. (My timing hardware has no choices
> between 10nS and 100nS to try.)
Glad to hear. I have been investigating alternatives for a driver, and the
mosfet approach I was gravitating toward would likely not have made any
difference if the BBB was driving the signal because it is active low with
an even higher resistance pull-up. I will look into building a kernel, I
know there are instructions for the cross-compile tools, so it should be
straight forward.
Last item, do you know if the DTS src includes the Beaglebone-Green? If not,
what can I do to help make that happen. Once I get the Black running, I have
a Green to build as its ~twin.
Tony
More information about the freebsd-arm
mailing list