Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Mar 2014 17:10:45 -0300
From:      Luiz Otavio O Souza <lists.br@gmail.com>
To:        Brian McGovern <mcgovern@beta.com>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: Beaglebone black: are the AIN pins available with gpioctl
Message-ID:  <CAB=2f8xCK584=YRKz1_tP794eXgMWSU3cVtUEEYViyHvXHqHXw@mail.gmail.com>
In-Reply-To: <1395280002.1367.5.camel@fbsd-laptop>
References:  <1394852976.1369.3.camel@fbsd-laptop> <CAB=2f8x_2QYTTNnkQzi1AnEM-3muc%2BrBaJ5dkM-TecWbr-Witw@mail.gmail.com> <1395280002.1367.5.camel@fbsd-laptop>

next in thread | previous in thread | raw e-mail | index | archive | help
On 19 March 2014 22:46, Brian J. McGovern wrote:
>
> On Sat, 2014-03-15 at 02:23 -0300, Luiz Otavio O Souza wrote:
>> On 15 March 2014 00:09, Brian J. McGovern wrote:
>> > I'm trying to read through all the details in the Beaglebone Black
>> > System Reference manual, but I don't think I've seen this particular
>> > piece yet... Are the AIN pins available via gpioctl or another interface
>> > in 10.0-RELEASE?
>>
>> No, there is no support for the ADC on 10.0-RELEASE.
>>
>> I've just tested a driver for the BBB ADC, now i need to write a man
>> page and publish the code (on this ML).
>>
>> If everything is fine, it will be available on -head and on 10-stable soon.
>>
>> Luiz
>>
>
> Luiz,
>   I grabbed your patches that you posted on 17 March, and patched them
> in to FreeBSD 10. Overall, the driver seems to work fine. The only issue
> that I'm having is that after some period of time (it has varied from a
> few minutes to over a half hour), the analog input freezes up,
> continuing to provide the last reading, despite changes on the analog
> input - verified via a voltage meter. The only way I've been able to
> recover is to reboot.
>
>   Obviously, I need to do some more testing and try to figure out why
> its locking up, but I thought you'd like to know.

Yes, i have seen it here too (and a few other issues).

The code wasn't too clever and it was upsetting the ADC in various situations.

It was running in continuos mode which was overflowing the FIFO
counter, generating spurious interrupts.

If you set the prescaler clockdiv to a low value a few other problems
show up (the FIFO wasn't being drained at ADC shutdown, etc.).

I think i have fixed all the issues and now i can push it to almost
100% of CPU in the interrupt handler without upsetting it.

I'll run a 24 hour test and if everything is fine i'll post the updated code.

Thanks for the report.

Luiz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAB=2f8xCK584=YRKz1_tP794eXgMWSU3cVtUEEYViyHvXHqHXw>