SAF FCCU Fault handling R1, R2 and R3 Reaction

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

SAF FCCU Fault handling R1, R2 and R3 Reaction

379 Views
Harish_R
Contributor III

Hi team,

overview: working on eMCEM module for error handling. so as per the design of SAF (eMCEM module) when the NCF fault is triggered through eMcem_InjectFault(). alarm handlers are called. 

i see two alarm handlers can be called. 

1. eMcemUserAlarmHandler - can return EMCEM_ERR_RECOVERED/EMCEM_ERR_NOT_RECOVERED based on convenient. i also see emcem_clearfault API is called eventually 

Harish_R_0-1754286287382.png

if i return EMCEM_ERR_RECOVERED but what if the Error is not actually cleared. and also, only emcem_clearfault just clears the status of fault. how is it expected to handle? 

if EMCEM_ERR_RECOVERED is returned then in that case even the NMI is not triggered. so, what is need for NMI in that case. how NMI is utilised?

2. eMcemDefaultAlarmHandler - using this API would always return error not recovered status because it returns the same. and triggers ISR again. how can it be handled?

if i want to set DTC at what condition would i set the DTC for fault that are unrecoverable. 

If someone can drop some info. it would be helpful.

 

BR,

Harish R

 

0 Kudos
Reply
1 Reply

353 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @Harish_R 

Thanks for your post.

1. The eMCEM driver provides an ability to handle the ALARM events by defining an alarm handler function. The user can define his own handling function for any FCCU fault. One handler function can be used for more faults. Faults configured as SW recoverable are automatically cleared by the eMCEM Driver in case the handler returned EMCEM_ERR_RECOVERED

Sometimes, the fault captured by the FCCU may not impact the actual function of certain IP, after the handler cleared the fault, the system may continue run without issues. sometimes, only cleared the fault is not enough, the error exists, and the corresponding faults may be set after cleared, then it is user's responsibility to implement the code to actually fix the issue

2. The default handling function eMcemDefaultAlarmHandler is defined and it returns EMCEM_ERR_NOT_RECOVERED if the user does not want to handle the fault by himself. The fault will not be cleared in this case, so it is used for the case that the user does not want to handle the fault, as a result, the fault could be "Not recovered"

3. The users may determine which kinds of faults could be treated as unrecoverable when defining the DTC according to their own design/use case.

 

BR

Chenyin

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2145893%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESAF%20FCCU%20Fault%20handling%20R1%2C%20R2%20and%20R3%20Reaction%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2145893%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20team%2C%3C%2FP%3E%3CP%3E%3CSTRONG%3Eoverview%3C%2FSTRONG%3E%3A%20working%20on%20eMCEM%20module%20for%20error%20handling.%20so%20as%20per%20the%20design%20of%20SAF%20(eMCEM%20module)%20when%20the%20NCF%20fault%20is%20triggered%20through%20eMcem_InjectFault().%20alarm%20handlers%20are%20called.%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20see%20two%20alarm%20handlers%20can%20be%20called.%26nbsp%3B%3C%2FP%3E%3CP%3E1.%26nbsp%3BeMcemUserAlarmHandler%20-%20can%20return%26nbsp%3BEMCEM_ERR_RECOVERED%2FEMCEM_ERR_NOT_RECOVERED%20based%20on%20convenient.%20i%20also%20see%20emcem_clearfault%20API%20is%20called%20eventually%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Harish_R_0-1754286287382.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Harish_R_0-1754286287382.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F350743i9DC4A50CC0552A1B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Harish_R_0-1754286287382.png%22%20alt%3D%22Harish_R_0-1754286287382.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Eif%20i%20return%20%3CSTRONG%3EEMCEM_ERR_RECOVERED%3C%2FSTRONG%3E%20but%20what%20if%20the%20Error%20is%20not%20actually%20cleared.%20and%20also%2C%20only%26nbsp%3Bemcem_clearfault%20just%20clears%20the%20status%20of%20fault.%20how%20is%20it%20expected%20to%20handle%3F%26nbsp%3B%3C%2FP%3E%3CP%3Eif%26nbsp%3B%3CSTRONG%3EEMCEM_ERR_RECOVERED%3C%2FSTRONG%3E%20is%20returned%20then%20in%20that%20case%20even%20the%20NMI%20is%20not%20triggered.%20so%2C%20what%20is%20need%20for%20NMI%20in%20that%20case.%20how%20NMI%20is%20utilised%3F%3C%2FP%3E%3CP%3E%3CSPAN%3E2.%20%3CSTRONG%3EeMcemDefaultAlarmHandler%3C%2FSTRONG%3E%20-%20using%20this%20API%20would%20always%20return%20error%20not%20recovered%20status%20because%20it%20returns%20the%20same.%20and%20triggers%20ISR%20again.%20how%20can%20it%20be%20handled%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Eif%20i%20want%20to%20set%20DTC%20at%20what%20condition%20would%20i%20set%20the%20DTC%20for%20fault%20that%20are%20unrecoverable.%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20someone%20can%20drop%20some%20info.%20it%20would%20be%20helpful.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EBR%2C%3C%2FP%3E%3CP%3EHarish%20R%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2147280%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20SAF%20FCCU%20Fault%20handling%20R1%2C%20R2%20and%20R3%20Reaction%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2147280%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F242921%22%20target%3D%22_blank%22%3E%40Harish_R%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20post.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3E1.%20The%20eMCEM%20driver%20provides%20an%20ability%20to%20handle%20the%20ALARM%20events%20by%20defining%20an%20alarm%20handler%20function.%20The%20user%20can%20define%20his%20own%20handling%20function%20for%20any%20FCCU%20fault.%20One%20handler%20function%20can%20be%20used%20for%20more%20faults.%20Faults%20configured%20as%20SW%20recoverable%20are%20automatically%20cleared%20by%20the%20eMCEM%26nbsp%3B%3C%2FSPAN%3E%3CLI-WRAPPER%3E%3CSPAN%20class%3D%22fontstyle0%22%3EDriver%20in%20case%20the%20handler%20returned%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3EEMCEM_ERR_RECOVERED%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3E.%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI-WRAPPER%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3ESometimes%2C%20the%20fault%20captured%20by%20the%20FCCU%20may%20not%20impact%20the%20actual%20function%20of%20certain%20IP%2C%20after%20the%20handler%20cleared%20the%20fault%2C%20the%20system%20may%20continue%20run%20without%20issues.%20sometimes%2C%20only%20cleared%20the%20fault%20is%20not%20enough%2C%20the%20error%20exists%2C%20and%20the%20corresponding%20faults%20may%20be%20set%20after%20cleared%2C%20then%20it%20is%20user's%20responsibility%20to%20implement%20the%20code%20to%20actually%20fix%20the%20issue%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CLI-WRAPPER%3E%3CSPAN%20class%3D%22fontstyle0%22%3E2.%20The%20default%20handling%20function%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3EeMcemDefaultAlarmHandler%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3Eis%20defined%20and%20it%20returns%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3EEMCEM_ERR_NOT_RECOVERED%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3Eif%20the%20user%20does%20not%20want%20to%20handle%20the%20fault%20by%20himself.%20The%20fault%20will%20not%20be%20cleared%20in%20this%20case%2C%20so%20it%20is%20used%20for%20the%20case%20that%20the%20user%20does%20not%20want%20to%20handle%20the%20fault%2C%20as%20a%20result%2C%20the%20fault%20could%20be%20%22Not%20recovered%22%3C%2FSPAN%3E%3CBR%20%2F%3E%3C%2FLI-WRAPPER%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3E3.%20The%20users%20may%20determine%20which%20kinds%20of%20faults%20could%20be%20treated%20as%20unrecoverable%20when%20defining%20the%20DTC%20according%20to%20their%20own%20design%2Fuse%20case.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3EBR%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3EChenyin%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E