Dual Core dsPICs - anyone tried these?

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jay_dee
Posts: 229
http://meble-kuchenne.info.pl
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 91 times
Been thanked: 58 times

Dual Core dsPICs - anyone tried these?

Post 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.

chipfryer27
Valued Contributor
Posts: 1679
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 581 times

Re: Dual Core dsPICs - anyone tried these?

Post 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

mnfisher
Valued Contributor
Posts: 1626
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 142 times
Been thanked: 758 times

Re: Dual Core dsPICs - anyone tried these?

Post 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

Post Reply