Sync_flags occurs when using SMP in multi-core controllers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sync_flags occurs when using SMP in multi-core controllers

646 Views
Zyp
Contributor II

hello,NXP’s engineer, when i debug s32K324 some problem occurs. i use the freertos6.0.0 and open SMP ,Sync_flags occurs when using SMP in multi-core controllers.

Zyp_0-1758700061019.png

however , i also write 

 
IP_MC_ME->PRTN0_CORE1_ADDR = (uint32)0x00600000;
IP_MC_ME->PRTN0_CORE1_PCONF = 0x00000001;
IP_MC_ME->PRTN0_CORE1_PUPD = 0x00000001;
IP_MC_ME->CTL_KEY = 0x5AF0U;
IP_MC_ME->CTL_KEY = 0xA50FU;
while (IP_MC_ME->PRTN0_CORE1_PUPD == 1) { };
while ((IP_MC_ME->PRTN0_CORE1_STAT & MC_ME_PRTN0_CORE1_STAT_CCS_MASK) == 0) { };

 

,so What could be the problem?

0 Kudos
Reply
6 Replies

602 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Zyp 

Isn't that just data cache issue? Did you follow user manual for Freertos package? Here's a screenshot from page 7:

lukaszadrapa_0-1758786383313.png

Regards,

Lukas

0 Kudos
Reply

517 Views
Zyp
Contributor II

This is my project,I hope you can help me take a look. I used the method of starting from the kernel in the demo, but I feel that the kernel did not start successfully

0 Kudos
Reply

478 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

I can see in your code that core 1 is enabled right in the boot configuration word, so it's started immediately after reset:

lukaszadrapa_0-1759233303641.png

 

lukaszadrapa_1-1759233330324.png

However, you are trying to enable core 1 in main function of core 0 again with some delay loop after that:

lukaszadrapa_2-1759233386909.png

Isn't this the root cause of your troubles? 

 

0 Kudos
Reply

358 Views
Zyp
Contributor II

I have tried your method, but it is still stuck in sync_flag. I have a question, does freertos 11.0 only need to use RTD 6.0 version? My version is RTD4.0.

0 Kudos
Reply

249 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

It's highly recommended to use RTD version which is mentioned in the release notes file:

lukaszadrapa_0-1760337760732.png

 

lukaszadrapa_1-1760337770459.png

 

Regards,

Lukas

0 Kudos
Reply

597 Views
Zyp
Contributor II

I disabled the D_CACHE_ENABLE,but the program is still stuck there.

Zyp_1-1758790020092.pngZyp_2-1758790049111.png

You can tell me what additional information is needed to solve this problem?

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2174835%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESync_flags%20occurs%20when%20using%20SMP%20in%20multi-core%20controllers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2174835%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehello%EF%BC%8CNXP%E2%80%99s%20engineer%2C%20when%20i%20debug%20s32K324%20some%20problem%20occurs.%20i%20use%20the%20freertos6.0.0%20and%20open%20SMP%20%2CSync_flags%20occurs%20when%20using%20SMP%20in%20multi-core%20controllers.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Zyp_0-1758700061019.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Zyp_0-1758700061019.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F358283i3B7568EABD512463%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Zyp_0-1758700061019.png%22%20alt%3D%22Zyp_0-1758700061019.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Ehowever%20%2C%20i%20also%20write%26nbsp%3B%3C%2FP%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EIP_MC_ME-%26gt%3BPRTN0_CORE1_ADDR%20%3D%20(uint32)0x00600000%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EIP_MC_ME-%26gt%3BPRTN0_CORE1_PCONF%20%3D%200x00000001%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EIP_MC_ME-%26gt%3BPRTN0_CORE1_PUPD%20%3D%200x00000001%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EIP_MC_ME-%26gt%3BCTL_KEY%20%3D%200x5AF0U%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EIP_MC_ME-%26gt%3BCTL_KEY%20%3D%200xA50FU%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Ewhile%20(IP_MC_ME-%26gt%3BPRTN0_CORE1_PUPD%20%3D%3D%201)%20%7B%20%7D%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Ewhile%20((IP_MC_ME-%26gt%3BPRTN0_CORE1_STAT%20%26amp%3B%20MC_ME_PRTN0_CORE1_STAT_CCS_MASK)%20%3D%3D%200)%20%7B%20%7D%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CP%3E%2Cso%26nbsp%3BWhat%20could%20be%20the%20problem%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2184570%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Sync_flags%20occurs%20when%20using%20SMP%20in%20multi-core%20controllers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2184570%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIt's%20highly%20recommended%20to%20use%20RTD%20version%20which%20is%20mentioned%20in%20the%20release%20notes%20file%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lukaszadrapa_0-1760337760732.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_0-1760337760732.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F360406i68236EF1A5BD68EA%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_0-1760337760732.png%22%20alt%3D%22lukaszadrapa_0-1760337760732.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lukaszadrapa_1-1760337770459.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_1-1760337770459.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F360407iFA38D337D5B7C717%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_1-1760337770459.png%22%20alt%3D%22lukaszadrapa_1-1760337770459.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2183399%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Sync_flags%20occurs%20when%20using%20SMP%20in%20multi-core%20controllers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2183399%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20have%20tried%20your%20method%2C%20but%20it%20is%20still%20stuck%20in%20sync_flag.%20I%20have%20a%20question%2C%20does%20freertos%2011.0%20only%20need%20to%20use%20RTD%206.0%20version%3F%20My%20version%20is%20RTD4.0.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2178186%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Sync_flags%20occurs%20when%20using%20SMP%20in%20multi-core%20controllers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2178186%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20can%20see%20in%20your%20code%20that%20core%201%20is%20enabled%20right%20in%20the%20boot%20configuration%20word%2C%20so%20it's%20started%20immediately%20after%20reset%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lukaszadrapa_0-1759233303641.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_0-1759233303641.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F359061i6125D6BD74817EAF%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_0-1759233303641.png%22%20alt%3D%22lukaszadrapa_0-1759233303641.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lukaszadrapa_1-1759233330324.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_1-1759233330324.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F359063iB37340CE0C9C7B41%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_1-1759233330324.png%22%20alt%3D%22lukaszadrapa_1-1759233330324.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EHowever%2C%20you%20are%20trying%20to%20enable%20core%201%20in%20main%20function%20of%20core%200%20again%20with%20some%20delay%20loop%20after%20that%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lukaszadrapa_2-1759233386909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_2-1759233386909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F359066iF58AED3D03108B94%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_2-1759233386909.png%22%20alt%3D%22lukaszadrapa_2-1759233386909.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIsn't%20this%20the%20root%20cause%20of%20your%20troubles%3F%26nbsp%3B%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2177190%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Sync_flags%20occurs%20when%20using%20SMP%20in%20multi-core%20controllers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2177190%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThis%20is%20my%20project%2CI%20hope%20you%20can%20help%20me%20take%20a%20look.%20I%20used%20the%20method%20of%20starting%20from%20the%20kernel%20in%20the%20demo%2C%20but%20I%20feel%20that%20the%20kernel%20did%20not%20start%20successfully%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2175636%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Sync_flags%20occurs%20when%20using%20SMP%20in%20multi-core%20controllers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2175636%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20disabled%20the%26nbsp%3BD_CACHE_ENABLE%2Cbut%26nbsp%3B%3CSPAN%3Ethe%20program%20is%20still%20stuck%20there.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Zyp_1-1758790020092.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Zyp_1-1758790020092.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F358493i9BB4668F764687C1%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Zyp_1-1758790020092.png%22%20alt%3D%22Zyp_1-1758790020092.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Zyp_2-1758790049111.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Zyp_2-1758790049111.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F358494iFBE150C871117E9A%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Zyp_2-1758790049111.png%22%20alt%3D%22Zyp_2-1758790049111.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EYou%20can%20tell%20me%20what%20additional%20information%20is%20needed%20to%20solve%20this%20problem%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2175572%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Sync_flags%20occurs%20when%20using%20SMP%20in%20multi-core%20controllers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2175572%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F252925%22%20target%3D%22_blank%22%3E%40Zyp%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIsn't%20that%20just%20data%20cache%20issue%3F%20Did%20you%20follow%20user%20manual%20for%20Freertos%20package%3F%20Here's%20a%20screenshot%20from%20page%207%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lukaszadrapa_0-1758786383313.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_0-1758786383313.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F358471iE4CCD7AB6693A893%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_0-1758786383313.png%22%20alt%3D%22lukaszadrapa_0-1758786383313.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E