Nicla vision and multi-threading

Hi! I was wondering if we are about to assign threads to different cores on a Nicla Vision since the STM32H747AII6 chip the board uses has one M7 core and one M4 core.
On Arduino IDE, we can select the M7/M4 core to upload the program to. I tried importing the _thread module but it did not work.

Hi, Ibrahim made some code to do this… but, I don’t think we ever released it. It was more of a concept. Honestly, there’s not much point. You want the M4 to work on something that’s separate than the M7. They should not share code as threads.

Regarding async behavior. You should use the usasyncio module for that.

Thank you for the timely reply! Yes, making the two cores run different programs is exactly what we want to achieve. Are we able to do it using the usasyncio module? Do we have examples for that purpose? If not, is there a way to upload different programs to the two separate cores explicitly just like using the Arduino IDE? How are we supposed to exchange data between the two cores?

Hi, it’s not supported at this moment. So, if you want to do that you need to edit the C firmware yourself and start the second core running a program.

1 Like