Comments (23)
That should be OK. I did a quick test on a RPi 5 with your code, and it works! Perhaps your wiring is not OK? Also the GPIO interrupt is triggered immediately, because you are using GPIOInterruptOnRisingEdge
. Perhaps GPIOInterruptOnFallingEdge
would be better. But this shouldn't be the problem here. Which RPi model are you using?
from circle.
from circle.
from circle.
Thanks @rsta2 , i am using raspberry pi 4b, the circuit is this. no preference on GPIOInterruptOnRisingEdge
or GPIOInterruptOnFallingEdge
, but it seems mine does not work (even i short circuit the GPIO 17 and GND to mimic pressed buttion.
Or should i give 3v3 to GPIO 17?
from circle.
from circle.
Thx, i tried three other pins still not working, i am using headless mode, does it affect the GPIO? Did you have special settings in for example cmdline.txt, config.txt ?
from circle.
from circle.
logger: Circle 46 started on Raspberry Pi 4 Model B 4GB (AArch64)
logger: Revision code is c03111, compiler has been GCC 13.2.1
Is it possible that my compiler (on Windows) may do something differently? this is the zip of my sd card contents sdcard.zip, does it work for you too (GPIO18)? Thanks!
from circle.
You have the same revision of the RPi 4B like me, but 4GB RAM. I have only 2GB, but this shouldn't make a difference. I tried your SD card contents, and I got the same behavior like you. The GPIO interrupt does not work. But interrupts generally work, because the timer can calculate the SpeedFactor.
The recommended toolchain for Circle builds can be downloaded here. You should still use the GNU C 12.2.Rel1 based toolchain (see more at the bottom of the page). I think this is the right download for you.
With the Linux version of this toolchain I build the attached kernel8-rpi4.img. Can you please extract it from the .zip archive and put it on the same SD card for a test? It does work here (with GPIO18).
from circle.
Thanks for the patience, i have tried your binary and also my build using your recommended toolchain. Both does not work, i wonder if it is firmware mismatch (using tag "Step46") or my configure being wrong (./configure --raspberrypi 4 --realtime --prefix aarch64-none-elf- --multicore --c++17
)🤣🤣
from circle.
thx, i see, after removed --realtime
and rebuilt everything, it does not work. I am not a ARM guy but would like to curiously ask: Is it possible for RPi 4B in different RAM to have different internal structure like GPIO address mapping?
from circle.
from circle.
i deleted the circle repo, redo git clone circle, reconfigure and recompile everything
from circle.
that should be sufficient
from circle.
Could you please recommend some software / hardware tricks to check if the pins or the Pi itself is really broken so i can save money to buy another one 🤣🤣. Apparently it looks good since the RX / TX pins are working for serial print, and i am desperate for using circle in my final year project 🤣🤣
from circle.
Wow thanks, going to flash the OS and try!
from circle.
@rsta2 my bad bro. It is my power supply not having enough current to drive all GPIOs. Official power supply rated 3A, i was using power from computer usb port😬😬.
However, i see the interrupt working, but in unexpected way: it seems the interrupt and the SimpleMsDelay
in while true loop are having racing condition?
from circle.
from circle.
When i pressed the button for interrupt, the "Hello UART!\n";
may not be printed, "in the loop!\n";
keeps printing per period of time. But "Hello UART!\n";
may appear multiple times later like they are from the queue.
To keep the button working more responsively, i have to press the button in high speed. Doesn't interrupt mechanism debounce the button signal?
from circle.
from circle.
@rsta2 i see and thx so much bro! Let me close this
from circle.
Finally it works perfectly! I use my own debounced button connected to 3.3V with rising edge and pulled down interrupt GPIO 18
from circle.
from circle.
Related Issues (20)
- release-45.2 usb samples compile with errors HOT 2
- TCP Connection in Interrupt HOT 2
- I2C feature request: add support for repeated start HOT 6
- USB CDC/ACM gadget HOT 19
- GetClockTicks without wrap HOT 3
- GPU support on Raspi 4 HOT 4
- Circle linker failure with softfp HOT 2
- Make USB gadget vendor and device strings configurable HOT 2
- Support for touchscreens with additional reports in HID descriptor HOT 7
- Question about log when testing with Qemu HOT 2
- Help with setting PREFIX HOT 4
- Question: Waveshare 5'' DSI display support? HOT 2
- Waveshare 15.6inch Capacitive Touch Screen HOT 2
- Can I run OpenCV? HOT 2
- Sample "07-usbstorage" fails with Pi5 HOT 8
- Unsuportted USB touch screen driver - Big Tree Tech HDMI7 HOT 10
- FIQ support on RPI Zero 2 HOT 3
- How to remove all text not from own CSerialDevice HOT 11
- Ability to set HDMI output refresh rate HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from circle.