Search found 5211 matches

by pythoncoder
Mon Jun 21, 2021 8:53 am
Forum: General Discussion and Questions
Topic: unregister interrupt handler (callback)?
Replies: 1
Views: 39

Re: unregister interrupt handler (callback)?

I think you can issue Pin.irq with handler=None. However I've never actually tried this.
by pythoncoder
Sat Jun 19, 2021 2:48 pm
Forum: Raspberry Pi microcontroller boards
Topic: RPi pico machine.SPI periodic dropout.
Replies: 18
Views: 668

Re: RPi pico machine.SPI periodic dropout.

@JWF Now done, please see here.

MicroPython sourcecode is hosted on GitHub. Raising an issue is the way to report firmware bugs, so hopefully this will be addressed by the maintainers in due course.
by pythoncoder
Fri Jun 18, 2021 11:37 am
Forum: Programs, Libraries and Tools
Topic: Micropython asynchronous function for garage door opener
Replies: 3
Views: 105

Re: Micropython asynchronous function for garage door opener

My Pushbutton class to which you refer is for interfacing a physical switch: it copes with debouncing, detecting long and double presses, and suchlike. There is a simpler Switch class which just debounces an on/off switch or button. However your Pushbutton method is called from code, not from a phys...
by pythoncoder
Thu Jun 17, 2021 3:48 pm
Forum: General Discussion and Questions
Topic: Implementing SENT Interface in MicroPython?
Replies: 10
Views: 215

Re: Implementing SENT Interface in MicroPython?

I have no idea whether this is feasible - I think you're breaking new ground here. It depends on whether there is a significant overhead in calling a C function which was specified in Python as an ISR. Otherwise you may need to figure out how, in C, to allocate a function to an interrupt. I've often...
by pythoncoder
Thu Jun 17, 2021 3:39 pm
Forum: Raspberry Pi microcontroller boards
Topic: RPi pico machine.SPI periodic dropout.
Replies: 18
Views: 668

Re: RPi pico machine.SPI periodic dropout.

JWF wrote:
Wed Jun 16, 2021 8:22 pm
... However, even without the SPI in the below even more minimal case, the issue seems to persist...
This strikes me as a clear smoking gun: it is surely a bug. There should be no GC taking place in this minimal example.

I suggest you report this on GitHub. If you prefer I will do so,
by pythoncoder
Wed Jun 16, 2021 7:23 pm
Forum: Raspberry Pi microcontroller boards
Topic: RPi pico machine.SPI periodic dropout.
Replies: 18
Views: 668

Re: RPi pico machine.SPI periodic dropout.

A possibility is the fact that SPI.read() allocates, which is not allowed in an ISR. This will occur even though you aren't assigning the bytes object to a variable. On most ports allocating in an ISR leads to a traceback, but perhaps the Pico fails silently. If it behaves in this way I would regard...
by pythoncoder
Wed Jun 16, 2021 8:48 am
Forum: Raspberry Pi microcontroller boards
Topic: RPi pico machine.SPI periodic dropout.
Replies: 18
Views: 668

Is the ISR actually running?

OK, this is clearly a different problem from that reported by @dk2jk. You have an easily reproduced test case where the Pico appears not to be responding to an IRQ. There is a doubt in my mind as to whether the ISR is not being called, or if it is being called but the SPI is not responding. To resol...
by pythoncoder
Tue Jun 15, 2021 10:49 am
Forum: Raspberry Pi microcontroller boards
Topic: RPi pico machine.SPI periodic dropout.
Replies: 18
Views: 668

Re: RPi pico machine.SPI periodic dropout.

Yes. This is definitely worth pursuing. It seems very telling that two different candidates are producing such a similar outcome.
by pythoncoder
Tue Jun 15, 2021 10:46 am
Forum: General Discussion and Questions
Topic: Implementing SENT Interface in MicroPython?
Replies: 10
Views: 215

Re: Implementing SENT Interface in MicroPython?

RMT is an ESP32 hardware component so cannot be implemented on STM.