Routing pio interrupts to a specific core #1803
-
Hi I am currently working on a project that includes can2040 library which uses pio to emulate a can controller. it also uses interrupts for things like bit unstuffing and data notification. this library isnt re-entrant or multithread safe so I need to set the interrupts to work on the same core as transmit functions etc. I couldn't find any documentation Best Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Did you have any luck on this? I'm also using can2040 on one core and a wifi (lwip_threadsafe_background) on the 2nd core. At 250kbit/s I get quite some CAN parse errors when TCP connections are running, I guess that is due to PIO interrupts being handled on the 2nd core. |
Beta Was this translation helpful? Give feedback.
-
Each core has its own interrupt controller, so essentially the core which you call the NVIC commands will be the core that gets the interrupts. Just make sure only one core is responding to the PIO interrupt and make sure you're running on the right one to do the work... |
Beta Was this translation helpful? Give feedback.
Each core has its own interrupt controller, so essentially the core which you call the NVIC commands will be the core that gets the interrupts. Just make sure only one core is responding to the PIO interrupt and make sure you're running on the right one to do the work...