Giter Club home page Giter Club logo

beaglebone-gpio's People

Contributors

ehayon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beaglebone-gpio's Issues

Maybe a bug

Hello ehayon

I got the following situation ,,,

I have to change a pin on my BeagleBone (INPUT or OUTPUT) many times in my c program.
At boot the pin is input. and has high impedance.
During my program I change the pin as output ( pinMode(P8_44,OUTPUT,7,PULLUP) ; ) and I write to it HIGH or LOW ( digitalWrite(P8_44,HIGH) ; or digitalWrite(P8_44,LOW) ; ) .
When I make again the pin input ( pinMode(P8_44,INPUT,7,PULLUP) ; ), the pin does not have high impedance.

Looking at the sysfs I got that the pin is INPUT.

thank you in advanced for your help

Analog read needs adc_init call, maybe run ADC in continuous mode? Averaging seems wrong bits?

Changed these lines in gpio.c
map[(ADCSTEPCONFIG1-MMAP_OFFSET)/4] = 0x00<<19 | ADC_AVG16<<2 | 0x01;

the averaging is set by bit 2-4 (TRM 12.5.20) not 0-2 and I changed the mode to 01 = SW enabled, continuous. With one-shot the call to analogRead() returns the value from the previous call to analogRead(), in continous mode you get the current value. There may be a better way to do this.

Also there needs to be at least one call to adc_init() in the setup otherwise the above does not get set. I assumed that this line would do it, but it was not calling adc_init(), because I guess the clock was already enabled.

if(map[(CM_WKUP_ADC_TSC_CLKCTRL-MMAP_OFFSET)/4] & CM_WKUP_IDLEST_DISABLED)
adc_init();

Bus error

Hi, I get this error when use pins with high id bank.

For example:
digitalRead(P8_44);

Any idea?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.