Search found 8 matches

by torpi
Tue Nov 09, 2021 3:18 pm
Forum: Raspberry Pi microcontroller boards
Topic: Leveraging second core, code hangs
Replies: 10
Views: 4950

Re: Leveraging second core, code hangs

Hum. That is sad. The second core works really well for the same code with C/C++ implementation. So my take is that it's a problem in MicroPython, right?
by torpi
Mon Nov 08, 2021 7:30 pm
Forum: Raspberry Pi microcontroller boards
Topic: Leveraging second core, code hangs
Replies: 10
Views: 4950

Leveraging second core, code hangs

Hello everyone, I am trying to leverage the second core of the Raspberry Pico but for some reason I cannot explain, the code hangs after few seconds. Calling the second loop directly instead of calling it with a thread on the second core works properly. The second loop, should run 100 times but hang...
by torpi
Mon Nov 08, 2021 7:23 pm
Forum: Raspberry Pi microcontroller boards
Topic: Multicore FIFO
Replies: 9
Views: 17849

Re: Multicore FIFO

I can confirm I am also getting odd results on my side.

Torpi
by torpi
Mon Nov 08, 2021 3:58 pm
Forum: General Discussion and Questions
Topic: vscode Pylance complaining with decorators and timers
Replies: 0
Views: 950

vscode Pylance complaining with decorators and timers

Hello everyone, I am having some trouble getting Pylance happy with my decorator and hardware timers. @micropython.viper decorator gives me: "micropython" is not definedPylance and a basic Timer(period=10, mode=Timer.PERIODIC, callback=lambda t:mycallback()) gives this error: No overloads for "__ini...
by torpi
Wed Nov 03, 2021 12:16 pm
Forum: Raspberry Pi microcontroller boards
Topic: Multicore FIFO
Replies: 9
Views: 17849

Re: Multicore FIFO

Thank you for your message @pythoncoder! I'd suggest that it is only a subset of Python applications which will receive a significant performance boost using hardware FIFOs compared to a shared data structure. The golden rule of any optimisation is to identify where the bottleneck actually is . 100%...
by torpi
Tue Nov 02, 2021 1:52 pm
Forum: Raspberry Pi microcontroller boards
Topic: Multicore FIFO
Replies: 9
Views: 17849

Re: Multicore FIFO

Hello and thank you pythoncoder! I first thought of locking mechanisms but my understanding was that Queue() has a thread-safe implementation with all the required locking mechanism and I could basically pass a queue as an argument to the second thread: In Main: q = queue.Queue() _thread.start_new_t...
by torpi
Mon Nov 01, 2021 6:56 pm
Forum: Raspberry Pi microcontroller boards
Topic: Multicore FIFO
Replies: 9
Views: 17849

Multicore FIFO

Hello everyone, I am wondering if we can access the multicore FIFO so thread one on core 0 could send data to thread 2 on core 1? Basically, the equivalent of the C++ SDK ( here ) multicore_fifo_push_blocking() and multicore_push_pop_blocking() would do the job but I cannot find anything similar in ...
by torpi
Thu Oct 28, 2021 7:45 pm
Forum: Raspberry Pi microcontroller boards
Topic: Repeating timer with negative delay
Replies: 0
Views: 934

Repeating timer with negative delay

Hello everyone, I have been looking as much as I can in the documentation and tried to find anything in the source but could not figured out if Micropython offers the equivalent of the SDK negative delay in repeating timer using a Raspberry Pico (RP2) Here in the SDK Documentation we can read: // Ne...