Search found 58 matches
- Fri Apr 01, 2022 2:14 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: RP2040 PIO Pin change to HIGH do not works
- Replies: 19
- Views: 7105
Re: RP2040 PIO Pin change to HIGH do not works
A hard IRQ will interrupt a GC. Once the Python ISR has completed, the GC will resume from the point where it was interrupted. The ISR cannot allocate and any attempt to do so will raise an exception. Understood! Thank you very much @pythoncoder for your help. I will add a "test.append('ok')" insid...
- Fri Apr 01, 2022 12:47 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: RP2040 PIO Pin change to HIGH do not works
- Replies: 19
- Views: 7105
Re: RP2040 PIO Pin change to HIGH do not works
I don't know a way to improve on what you are doing. My understanding is: PWM is unaffected by GC. Timer callbacks on the RP2 are hard interrupts and should also be unaffected. Hello @pythoncoder Just to understand better about the item 2: if the GC is running when Timer IRQ happen, will the GC to ...
- Thu Mar 31, 2022 12:48 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: RP2040 PIO Pin change to HIGH do not works
- Replies: 19
- Views: 7105
Re: RP2040 PIO Pin change to HIGH do not works
In applications where I care about GC latency I explicitly call .collect() at points in the code where the latency is tolerable. Calling it regularly reduces the time it takes: the less garbage has accumulated, the quicker it runs. However as you've discovered 1-2ms is as good as it gets. This conf...
- Wed Mar 30, 2022 2:19 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: RP2040 PIO Pin change to HIGH do not works
- Replies: 19
- Views: 7105
Re: RP2040 PIO Pin change to HIGH do not works
Interrupts are soft by default: see docs . Each core on the RP2 runs a completely separate instance of MP. It is possible to disable GC >>> import gc >>> dir(gc) ['__class__', '__name__', 'collect', 'disable', 'enable', 'isenabled', 'mem_alloc', 'mem_free', 'threshold'] >>> however it requires grea...
- Tue Mar 29, 2022 9:10 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: RP2040 PIO Pin change to HIGH do not works
- Replies: 19
- Views: 7105
Re: RP2040 PIO Pin change to HIGH do not works
... I'm not using a push button, the signal (high/low) come from a digital signal, so, in this case, it do not need a debounce, because the signal is perfect. And, I'm doing a real-time application, so I need to use always with high speed interruption. I will force (run manually) the gc.collect() t...
- Mon Mar 28, 2022 6:54 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: RP2040 PIO Pin change to HIGH do not works
- Replies: 19
- Views: 7105
Re: RP2040 PIO Pin change to HIGH do not works
It's perhaps worth pointing out that these examples detect pin changes and pushbuttons usually produce multiple pin changes due to contact bounce . There are better ways of handling pushbuttons and switches such as the uasyncio classes documented here . Hello @pythoncoder I'm not using a push butto...
- Mon Mar 28, 2022 6:43 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: RP2040 PIO Pin change to HIGH do not works
- Replies: 19
- Views: 7105
Re: RP2040 PIO Pin change to HIGH do not works
Hi I have tried your program with a push button on pin 20 which is connected between the pin and ground. Also activated the pullup resistor on this pin and it works as expected. ie in first case interrupt is generated when push button is pressed and in second case the interrupt occurs when the push...
- Wed Mar 23, 2022 9:31 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: RP2040 PIO Pin change to HIGH do not works
- Replies: 19
- Views: 7105
Re: RP2040 PIO Pin change to HIGH do not works
I still have no success, could anyone help me?
Thank you.
Thank you.
- Tue Mar 22, 2022 1:27 am
- Forum: Raspberry Pi microcontroller boards
- Topic: RP2040 PIO Pin change to HIGH do not works
- Replies: 19
- Views: 7105
RP2040 PIO Pin change to HIGH do not works
Hi all I have this function below from this PIO example https://github.com/raspberrypi/pico-micropython-examples/blob/master/pio/pio_pinchange.py @rp2.asm_pio() def wait_pin_low(): wrap_target() wait(0, pin, 0) irq(block, rel(0)) wait(1, pin, 0) wrap() I would like to change that PIO function just t...
- Wed Jan 19, 2022 4:18 pm
- Forum: ESP32 boards
- Topic: Simple example of uasyncio WebSocket Server (secure - with SSL)
- Replies: 5
- Views: 9159
Re: Simple example of uasyncio WebSocket Server (secure - with SSL)
https://github.com/pfalcon/picoweb.git use uasyncio The Picoweb do not support websocket. Even uasyncio on PicoWeb is old, it is not the official v3 uasyncio compatible, but it is good start point. The https://github.com/jczic/MicroWebSrv use WebSocket, but is not official uwebsocket module - it wr...