S32K3: about AC_load_on_Job_Start

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

S32K3: about AC_load_on_Job_Start

3,424 Views
Jojo_Hu
Contributor II

1. According to the referrence manual, we need to enable AC_load_on_Job_Start to avoid RWW problems.

But when I enabled it as below picture, Fls_ACWriteSize and Fls_ACWriteRomStart are still undefined (the same as Fls_ACEraseSize and Fls_ACEraseRomStart).

Jojo_Hu_0-1750821620784.jpegJojo_Hu_0-1750821620784.jpeg

Jojo_Hu_1-1750821642119.jpegJojo_Hu_1-1750821642119.jpeg

Jojo_Hu_3-1750821740692.pngJojo_Hu_3-1750821740692.png

so how to solve this problem please ?

 

2. If AC_load_on_Job_Start is disabled and both Write and Erase are in Async mode, can the code flash block be writing/erasing while data flash be writing/erasing ?

 

Looking forward to your support, thank you!

 

0 Kudos
Reply
9 Replies

3,397 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Jojo_Hu 

1. Which RTD version is that?

2. Read-While-Write is supported between flash blocks. For example, the code can run from code flash while data flash is being programmed or erased. Notice that only one program or erase operation can run at a time. 

Regards,

Lukas

0 Kudos
Reply

3,370 Views
Jojo_Hu
Contributor II

hello,

for 1: 

SW32K3_S32M27x_RTD_4.4_4.0.0_P20_D2403
0 Kudos
Reply

3,266 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

I did quick test in this version. If the sector which is supposed to be erased is in the same flash block as Fls code, I can see that the code is copied to RAM as expected and the sector is successfully erased. Not sure what's going on on your side...

0 Kudos
Reply

3,254 Views
Jojo_Hu
Contributor II

how should I define these variables?

Jojo_Hu_0-1751540048260.pngJojo_Hu_0-1751540048260.png

 

0 Kudos
Reply

3,207 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

In my test code, I just initialized these addresses in configurator, so it points to unused RAM:

lukaszadrapa_0-1751955715691.pnglukaszadrapa_0-1751955715691.png

 

0 Kudos
Reply

3,193 Views
Jojo_Hu
Contributor II

Which parts of the code in ROM will be placed at this address in RAM ? 

This function ?

Jojo_Hu_0-1751978216903.pngJojo_Hu_0-1751978216903.png

 

0 Kudos
Reply

3,178 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Yes, C40_Ip_AccessCode is copied to RAM. 

0 Kudos
Reply

2,692 Views
Jojo_Hu
Contributor II

hi,

The memory distribution of Application and Bootloader are as follows.

If we want to erase and write Application while running in bootloader, and Ac load at startup has been enabled, do we need to configure the on-core MPU as mentioned in the second picture in PreTaskHook ?

Jojo_Hu_0-1757918173892.pngJojo_Hu_0-1757918173892.png

Jojo_Hu_1-1757918311233.pngJojo_Hu_1-1757918311233.png

 

 

0 Kudos
Reply

3,270 Views
Jojo_Hu
Contributor II

@lukaszadrapa 

 

for question 1,

looking forward for your kind support. Tks.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2122718%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K3%3A%20about%20AC_load_on_Job_Start%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2122718%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E1.%26nbsp%3BAccording%20to%20the%20referrence%20manual%2C%20we%20need%20to%20enable%20AC_load_on_Job_Start%20to%20avoid%20RWW%20problems.%3C%2FP%3E%3CP%3EBut%20when%20I%20enabled%20it%20as%20below%20picture%2C%20Fls_ACWriteSize%20and%20Fls_ACWriteRomStart%20are%20still%20undefined%20(the%20same%20as%20Fls_ACEraseSize%20and%20Fls_ACEraseRomStart).%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Jojo_Hu_0-1750821620784.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Jojo_Hu_0-1750821620784.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F344500iB794E573A1B6294F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Jojo_Hu_0-1750821620784.jpeg%22%20alt%3D%22Jojo_Hu_0-1750821620784.jpeg%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EJojo_Hu_0-1750821620784.jpeg%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Jojo_Hu_1-1750821642119.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Jojo_Hu_1-1750821642119.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F344501iC18DC4F60D927669%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Jojo_Hu_1-1750821642119.jpeg%22%20alt%3D%22Jojo_Hu_1-1750821642119.jpeg%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EJojo_Hu_1-1750821642119.jpeg%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Jojo_Hu_3-1750821740692.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Jojo_Hu_3-1750821740692.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F344503iA7237ED89048934C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Jojo_Hu_3-1750821740692.png%22%20alt%3D%22Jojo_Hu_3-1750821740692.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EJojo_Hu_3-1750821740692.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Eso%20how%20to%20solve%20this%20problem%20please%20%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E2.%20If%26nbsp%3BAC_load_on_Job_Start%20is%20disabled%20and%20both%20Write%20and%20Erase%20are%20in%20Async%20mode%2C%20can%20the%20code%20flash%20block%20be%20writing%2Ferasing%20while%20data%20flash%20be%20writing%2Ferasing%20%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ELooking%20forward%20to%20your%20support%2C%20thank%20you!%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2169410%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3%3A%20about%20AC_load_on_Job_Start%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2169410%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehi%2C%3C%2FP%3E%3CP%3EThe%20memory%20distribution%20of%20Application%20and%20Bootloader%20are%20as%20follows.%3C%2FP%3E%3CP%3EIf%20we%20want%20to%20erase%20and%20write%20Application%20while%20running%20in%20bootloader%2C%20and%20Ac%20load%20at%20startup%20has%20been%20enabled%2C%20do%20we%20need%20to%20configure%20the%20on-core%20MPU%20as%20mentioned%20in%20the%20second%20picture%20in%20PreTaskHook%20%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Jojo_Hu_0-1757918173892.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Jojo_Hu_0-1757918173892.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F356842iE0FEABB54173FA46%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Jojo_Hu_0-1757918173892.png%22%20alt%3D%22Jojo_Hu_0-1757918173892.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EJojo_Hu_0-1757918173892.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Jojo_Hu_1-1757918311233.png%22%20style%3D%22width%3A%20654px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Jojo_Hu_1-1757918311233.png%22%20style%3D%22width%3A%20654px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F356844i976CC153BC0694BA%2Fimage-dimensions%2F654x139%3Fv%3Dv2%22%20width%3D%22654%22%20height%3D%22139%22%20role%3D%22button%22%20title%3D%22Jojo_Hu_1-1757918311233.png%22%20alt%3D%22Jojo_Hu_1-1757918311233.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EJojo_Hu_1-1757918311233.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2130606%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3%3A%20about%20AC_load_on_Job_Start%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2130606%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYes%2C%26nbsp%3BC40_Ip_AccessCode%20is%20copied%20to%20RAM.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2130152%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3%3A%20about%20AC_load_on_Job_Start%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2130152%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWhich%20parts%20of%20the%20code%20in%20ROM%20will%20be%20placed%20at%20this%20address%20in%20RAM%20%3F%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20function%20%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Jojo_Hu_0-1751978216903.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Jojo_Hu_0-1751978216903.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F346542i5EAC82D1A5B62E8E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Jojo_Hu_0-1751978216903.png%22%20alt%3D%22Jojo_Hu_0-1751978216903.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EJojo_Hu_0-1751978216903.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2129831%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3%3A%20about%20AC_load_on_Job_Start%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2129831%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIn%20my%20test%20code%2C%20I%20just%20initialized%20these%20addresses%20in%20configurator%2C%20so%20it%20points%20to%20unused%20RAM%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-1751955715691.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_0-1751955715691.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F346446iE470C5D77BD22301%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_0-1751955715691.png%22%20alt%3D%22lukaszadrapa_0-1751955715691.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Elukaszadrapa_0-1751955715691.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2128049%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3%3A%20about%20AC_load_on_Job_Start%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2128049%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehow%20should%20I%20define%20these%20variables%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Jojo_Hu_0-1751540048260.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Jojo_Hu_0-1751540048260.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F345979i1CA8510508280DF0%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Jojo_Hu_0-1751540048260.png%22%20alt%3D%22Jojo_Hu_0-1751540048260.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EJojo_Hu_0-1751540048260.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2127226%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3%3A%20about%20AC_load_on_Job_Start%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2127226%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20did%20quick%20test%20in%20this%20version.%20If%20the%20sector%20which%20is%20supposed%20to%20be%20erased%20is%20in%20the%20same%20flash%20block%20as%20Fls%20code%2C%20I%20can%20see%20that%20the%20code%20is%20copied%20to%20RAM%20as%20expected%20and%20the%20sector%20is%20successfully%20erased.%20Not%20sure%20what's%20going%20on%20on%20your%20side...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2127218%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3%3A%20about%20AC_load_on_Job_Start%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2127218%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F37795%22%20target%3D%22_blank%22%3E%40lukaszadrapa%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Efor%20question%201%2C%3C%2FP%3E%3CP%3Elooking%20forward%20for%20your%20kind%20support.%20Tks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2125118%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3%3A%20about%20AC_load_on_Job_Start%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2125118%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehello%2C%3C%2FP%3E%3CP%3Efor%201%3A%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CSPAN%20class%3D%22%22%3ESW32K3_S32M27x_RTD_4.4_4.0.0_P20_D2403%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2124777%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3%3A%20about%20AC_load_on_Job_Start%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2124777%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%2F191956%22%20target%3D%22_blank%22%3E%40Jojo_Hu%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E1.%20Which%20RTD%20version%20is%20that%3F%3C%2FP%3E%0A%3CP%3E2.%20Read-While-Write%20is%20supported%20between%20flash%20blocks.%20For%20example%2C%20the%20code%20can%20run%20from%20code%20flash%20while%20data%20flash%20is%20being%20programmed%20or%20erased.%20Notice%20that%20only%20one%20program%20or%20erase%20operation%20can%20run%20at%20a%20time.%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E