UART usage on RP2040: UART.IRQ, run UART on CORE_1 #12247
Replies: 2 comments 2 replies
-
I suggest ignoring core 1 and using Multi-core programming is difficult with a lot of potential for subtle bugs. Using |
Beta Was this translation helpful? Give feedback.
-
@Flipje1955, hey. You might find this interesting:
To test this, you need to short GPIO4 and GPIO5 (on the same board) of your Pi Pico. You may get some noise and need to filter it out in your handler. I do not know how useful or stable this setup is for your project. You can give it a try. There is always asyncio to fall back on to. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As part of my project, I need to process a load of external sensor to detect passing objects (mini_train project). The sensors are typically but not exclusively hall_sensor modules. I have dedicated a rp2040 Pico to control all these sensors in order to unload the "master controller", also running on a rp2040 Pico.
I intend to have the two (and in the future ++) rp2040's talk to each other using UARTs where I had hoped to use UART.irq to avoid continued polling for incoming data but that functionality appears not to be implemented (yet ?) for this platform.
I have seen recommendations to use Asyncio instead.
Considering my options (and maintaining the ambition to unload the master), is using the Threading library and "dedicating" the Core1 to the UART monitoring for any incoming sensor_data a possible and sensible route ?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions