SAF sBoot CMU_FC Checks

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

SAF sBoot CMU_FC Checks

1,817 Views
ziwu
Contributor II

I don't know how to set the parameters when I config the CMU_FC check in sBoot. I set some values as my understand and generate the code, how are the generated LFREF and HFREF values derived based on the values I set? Can you show the calculation process?

ziwu_0-1765883055953.png

ziwu_1-1765883088726.png

in my opinion, the parameter I set above should compare with RCCR.REF_CNT/ HTCR.HFREF/LTCR.LFREF. if FXOSC=40M, how can I config CMU_FC0 check? when I should set RCCR.REF_CNT/ HTCR.HFREF/LTCR.LFREF? what's the values?

Tags (1)
0 Kudos
Reply
4 Replies

1,776 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @ziwu,

All the calculations can be found in the S32K3xx RM rev.11

Section 56.5.2 Programming HFREF and LFREF.

 

Regards,

Daniel

0 Kudos
Reply

1,730 Views
ziwu
Contributor II

1. I check the RM Rev.11, I cannot get the result yet, what's the bus clock? is it system clock? 

 2. I checked the EB tresos, the RCCR set as 0x50 when “Mcu Register Value Optimization” enabled, all RCCR of CMU_FC0/3/4 are 0x50, why they are the same value? I can't get 0x50 by the following formula. How to get 0x50?

ziwu_0-1766105709787.png

 

Tags (1)
0 Kudos
Reply

1,310 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @ziwu,

I'm sorry for the delay, I'm currently out of office, and I could not reply earlier.

 

The system clock should be set precisely to one of the clock options listed in the RM, e.g. Table 157. Option A - High Performance mode (CORE_CLK @ 160 MHz).

Then, Bus clock = Register interface clock = AIPS_SLOW_CLK

danielmartynek_1-1766930897683.png

danielmartynek_0-1766930828127.png

I currently cannot test the SAF sBoost driver.

But the thresholds are also calculated and set by the MCAL MCU driver if the CMUs are enabled.

Here is an example for S32DS IDE and RTD 6.0.0:

https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K344-MCAL-MCU-ClockMonitor-v1-0-S32DS36-...

 

Regards,

Daniel

 

 

 

0 Kudos
Reply

1,283 Views
ziwu
Contributor II

Got it, thanks

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2263889%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESAF%20sBoot%20CMU_FC%20Checks%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2263889%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20don't%20know%20how%20to%20set%20the%20parameters%20when%20I%20config%20the%20CMU_FC%20check%20in%20sBoot.%20I%20set%20some%20values%20as%20my%20understand%20and%20generate%20the%20code%2C%26nbsp%3Bhow%20are%20the%20generated%20LFREF%20and%20HFREF%20values%20derived%20based%20on%20the%20values%20I%20set%3F%26nbsp%3BCan%20you%20show%20the%20calculation%20process%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ziwu_0-1765883055953.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ziwu_0-1765883055953.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ziwu_0-1765883055953.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ziwu_0-1765883055953.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ziwu_0-1765883055953.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ziwu_0-1765883055953.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F370213iC565527C4859678E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ziwu_0-1765883055953.png%22%20alt%3D%22ziwu_0-1765883055953.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%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%22ziwu_1-1765883088726.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ziwu_1-1765883088726.png%22%20style%3D%22width%3A%20387px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ziwu_1-1765883088726.png%22%20style%3D%22width%3A%20387px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ziwu_1-1765883088726.png%22%20style%3D%22width%3A%20387px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ziwu_1-1765883088726.png%22%20style%3D%22width%3A%20387px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ziwu_1-1765883088726.png%22%20style%3D%22width%3A%20387px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F370214iB594C9A7625C350E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ziwu_1-1765883088726.png%22%20alt%3D%22ziwu_1-1765883088726.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Ein%20my%20opinion%2C%20the%20parameter%20I%20set%20above%20should%20compare%20with%20RCCR.REF_CNT%2F%20HTCR.HFREF%2FLTCR.LFREF.%20if%20FXOSC%3D40M%2C%20how%20can%20I%20config%20CMU_FC0%20check%3F%20when%20I%20should%20set%20RCCR.REF_CNT%2F%20HTCR.HFREF%2FLTCR.LFREF%3F%20what's%20the%20values%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2264908%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20SAF%20sBoot%20CMU_FC%20Checks%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2264908%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F258066%22%20target%3D%22_blank%22%3E%40ziwu%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EAll%20the%20calculations%20can%20be%20found%20in%20the%20S32K3xx%20RM%20rev.11%3C%2FP%3E%0A%3CP%3ESection%2056.5.2%20Programming%20HFREF%20and%20LFREF.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2266410%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20SAF%20sBoot%20CMU_FC%20Checks%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2266410%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E1.%20I%20check%20the%20RM%20Rev.11%2C%20I%20cannot%20get%20the%20result%20yet%2C%20what's%20the%20bus%20clock%3F%20is%20it%20system%20clock%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B2.%20I%20checked%20the%20EB%20tresos%2C%20the%20RCCR%20set%20as%200x50%20when%26nbsp%3B%E2%80%9CMcu%20Register%20Value%20Optimization%E2%80%9D%20enabled%2C%20all%20RCCR%20of%20CMU_FC0%2F3%2F4%20are%200x50%2C%20why%20they%20are%20the%20same%20value%3F%20I%20can't%20get%200x50%20by%20the%20following%20formula.%20How%20to%20get%200x50%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ziwu_0-1766105709787.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ziwu_0-1766105709787.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ziwu_0-1766105709787.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ziwu_0-1766105709787.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F370670i6DD3C1407A23C730%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ziwu_0-1766105709787.png%22%20alt%3D%22ziwu_0-1766105709787.png%22%20%2F%3E%3C%2Fspan%3E%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-2269400%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20SAF%20sBoot%20CMU_FC%20Checks%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2269400%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%2F258066%22%20target%3D%22_blank%22%3E%40ziwu%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EI'm%20sorry%20for%20the%20delay%2C%20I'm%20currently%20out%20of%20office%2C%20and%20I%20could%20not%20reply%20earlier.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThe%20system%20clock%20should%20be%20set%20precisely%20to%20one%20of%20the%20clock%20options%20listed%20in%20the%20RM%2C%20e.g.%26nbsp%3BTable%20157.%20Option%20A%20-%20High%20Performance%20mode%20(CORE_CLK%20%40%20160%20MHz).%3C%2FP%3E%0A%3CP%3EThen%2C%20Bus%20clock%20%3D%20Register%20interface%20clock%20%3D%20AIPS_SLOW_CLK%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22danielmartynek_1-1766930897683.png%22%20style%3D%22width%3A%20667px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22danielmartynek_1-1766930897683.png%22%20style%3D%22width%3A%20667px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22danielmartynek_1-1766930897683.png%22%20style%3D%22width%3A%20667px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F371270iF608CDC100C3D057%2Fimage-dimensions%2F667x95%3Fv%3Dv2%22%20width%3D%22667%22%20height%3D%2295%22%20role%3D%22button%22%20title%3D%22danielmartynek_1-1766930897683.png%22%20alt%3D%22danielmartynek_1-1766930897683.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22danielmartynek_0-1766930828127.png%22%20style%3D%22width%3A%20638px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22danielmartynek_0-1766930828127.png%22%20style%3D%22width%3A%20638px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22danielmartynek_0-1766930828127.png%22%20style%3D%22width%3A%20638px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F371269i760F144FD10E2851%2Fimage-dimensions%2F638x144%3Fv%3Dv2%22%20width%3D%22638%22%20height%3D%22144%22%20role%3D%22button%22%20title%3D%22danielmartynek_0-1766930828127.png%22%20alt%3D%22danielmartynek_0-1766930828127.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EI%20currently%20cannot%20test%20the%20SAF%20sBoost%20driver.%3C%2FP%3E%0A%3CP%3EBut%20the%20thresholds%20are%20also%20calculated%20and%20set%20by%20the%20MCAL%20MCU%20driver%20if%20the%20CMUs%20are%20enabled.%3C%2FP%3E%0A%3CP%3EHere%20is%20an%20example%20for%20S32DS%20IDE%20and%20RTD%206.0.0%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-S32K344-MCAL-MCU-ClockMonitor-v1-0-S32DS36-RTD600%2Fta-p%2F2179976%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-S32K344-MCAL-MCU-ClockMonitor-v1-0-S32DS36-RTD600%2Fta-p%2F2179976%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2269418%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20SAF%20sBoot%20CMU_FC%20Checks%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2269418%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EGot%20it%2C%20thanks%3C%2FP%3E%3C%2FLINGO-BODY%3E