Page 1 of 1

Dual Core dsPICs - anyone tried these?

Posted: Tue Aug 05, 2025 11:10 am
by jay_dee
I've just been poking around the microchip website and saw Dual Core dsPICs.
I strongly suspect this would get me very tied up in knots but has anyone tried this sort of product?

I'm going to stick with a std dsPIC for now, but I like the idea of having one device that can run the general houskeeping and another that can be doing the higher speed realtime stuff or just running a CAN engine etc.. I wondoer how they share resources like hardware pins and Can they read/write to the same memory or at least share information?

J.

Re: Dual Core dsPICs - anyone tried these?

Posted: Tue Aug 05, 2025 12:02 pm
by chipfryer27
Hi

Never used thr dsPIC but a while back with Leighm's help I did get a RPi Pico running Dual Core. Much as you describe above, one core running x, the other y. I believe the ESP32 can do so too but never tried as I find it difflcult enough to get one doing anything let alone on a different core.

The Pico was quite simple to get running and you just used another User Maco for that core.

Regards

Edit

This link explains how to do on a Pico viewtopic.php?p=12436&hilit=pico+core#p12436

Re: Dual Core dsPICs - anyone tried these?

Posted: Tue Aug 05, 2025 1:27 pm
by mnfisher
On the esp32 it is easy to do - using xTaskCreatePinnedToCore to assign tasks to a specific core.

On the dsPic - it looks like you would need to use the 'core' directive to the compiler

for example:

void __attribute__((core(1))) slave_core_task(void) would run slave_core_task on core_1

The easiest way to (try to) do this in FC would be to use supplementary code - and define for example:

Code: Select all

void __attribute__((core(1))) slave_core_task(void)  {
   FCM_Core1_Task();
}
Then call slave_core_task(); from a code block....

Don't have anything to test this theory on though :-(

Martin