Example MPC5746R FCCU Alarm State GHS716

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

Example MPC5746R FCCU Alarm State GHS716

Example MPC5746R FCCU Alarm State GHS716

********************************************************************************
* File:                 main.c
* Owner:            Peter Vlna
* Version:           1.7
* Date:               Oct-10-2017
* Classification: General Business Information
* Brief:                Example contains startup with PLL0 200MHz as system clock
*                          and demonstrates reset triggered on FCCU Alarm state
*                          counter exppire.
********************************************************************************
* Test HW:  MPC57xx
* Maskset:  1N83M (cut 2.0B)
* Target :  internal_FLASH
* Fsys:     200MHz PLL0 as system clock
********************************************************************************
Revision History:
1.0     Oct-19-2015     Peter Vlna   Initial Version
1.1    Nov-11-2015    Peter Vlna   Added PPL0 200MHz as system clock
1.2    Dec-02-2015    Peter Vlna  Added Flash controller init
1.3    Dec-02-2015    Peter Vlna  Fixed system clock init
1.4    Feb-07-2017    Peter Vlna  SWT0 and SWT1 disabled in startup
1.5     May-31-2017    Peter Vlna  Fixed comments in AC6 (CLKOUT)
1.6     Oct-04-2017    Peter Vlna  Added PIT + Interrupts
1.7    Oct-05-2017    Peter Vlna  FCCU EOUT test in Alarm state with SMC
*******************************************************************************/

pastedImage_1.png

Attachments
Comments

Hi Peter,

In this example, you are using the functional muxing (MSCR registers) to confiure FCCU EOUT_0/1 pins as below. 

   SIUL2.MSCR0_255[112].R = 0x6|0x02000000;     /* FCCU EOUT_0 , ODC push-pul */
   SIUL2.MSCR0_255[115].R = 0x6|0x02000000;     /* FCCU EOUT_1 , ODC push-pul */

However, the recommended way to do this configuration is by DCF clients. -- Chapter 1.2.10 DCF_ERROR0_PAD_SELECT DCF client, MPC5746R Reference Manual Addendum, Rev. 2, 10/2016.  What's more, in the attached (in RM) "IO_Signal_Description and Input_Multiplexing_Tables", ERRORx is not listed as a muxing function which can be assigned to these potential ERROR OUT pins like PH[0] via SIUL2_MSCR registers.

Best Regards

Yunan

FCCU EOUT 这个问题,您解决了吗,方便告知下关键点吗

%3CLINGO-SUB%20id%3D%22lingo-sub-1128026%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20MPC5746R%20FCCU%20Alarm%20State%20GHS716%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1128026%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E********************************************************************************%3CBR%20%2F%3E*%20File%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20main.c%3CBR%20%2F%3E*%20Owner%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Peter%20Vlna%3CBR%20%2F%3E*%20Version%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201.7%3CBR%20%2F%3E*%20Date%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Oct-10-2017%3CBR%20%2F%3E*%20Classification%3A%20General%20Business%20Information%3CBR%20%2F%3E*%20Brief%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Example%20contains%20startup%20with%20PLL0%20200MHz%20as%20system%20clock%3CBR%20%2F%3E*%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20and%20demonstrates%20reset%20triggered%20on%20FCCU%20Alarm%20state%3CBR%20%2F%3E*%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20counter%20exppire.%3CBR%20%2F%3E********************************************************************************%3CBR%20%2F%3E*%20Test%20HW%3A%26nbsp%3B%20MPC57xx%3CBR%20%2F%3E*%20Maskset%3A%26nbsp%3B%201N83M%20(cut%202.0B)%3CBR%20%2F%3E*%20Target%20%3A%26nbsp%3B%20internal_FLASH%3CBR%20%2F%3E*%20Fsys%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20200MHz%20PLL0%20as%20system%20clock%3CBR%20%2F%3E********************************************************************************%3CBR%20%2F%3ERevision%20History%3A%3CBR%20%2F%3E1.0%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Oct-19-2015%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Peter%20Vlna%26nbsp%3B%26nbsp%3B%20Initial%20Version%3CBR%20%2F%3E1.1%26nbsp%3B%26nbsp%3B%20%26nbsp%3BNov-11-2015%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPeter%20Vlna%26nbsp%3B%26nbsp%3B%20Added%20PPL0%20200MHz%20as%20system%20clock%3CBR%20%2F%3E1.2%26nbsp%3B%26nbsp%3B%20%26nbsp%3BDec-02-2015%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPeter%20Vlna%26nbsp%3B%20Added%20Flash%20controller%20init%3CBR%20%2F%3E1.3%26nbsp%3B%26nbsp%3B%20%26nbsp%3BDec-02-2015%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPeter%20Vlna%26nbsp%3B%20Fixed%20system%20clock%20init%3CBR%20%2F%3E1.4%26nbsp%3B%26nbsp%3B%20%26nbsp%3BFeb-07-2017%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPeter%20Vlna%26nbsp%3B%20SWT0%20and%20SWT1%20disabled%20in%20startup%3CBR%20%2F%3E1.5%20%26nbsp%3B%26nbsp%3B%20%26nbsp%3BMay-31-2017%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPeter%20Vlna%26nbsp%3B%20Fixed%20comments%20in%20AC6%20(CLKOUT)%3CBR%20%2F%3E1.6%20%26nbsp%3B%26nbsp%3B%20%26nbsp%3BOct-04-2017%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPeter%20Vlna%26nbsp%3B%20Added%20PIT%20%2B%20Interrupts%3CBR%20%2F%3E1.7%26nbsp%3B%26nbsp%3B%20%26nbsp%3BOct-05-2017%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPeter%20Vlna%26nbsp%3B%20FCCU%20EOUT%20test%20in%20Alarm%20state%20with%20SMC%3CBR%20%2F%3E*******************************************************************************%2F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_1.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_1.png%22%20style%3D%22width%3A%20694px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F69597i07771FCC642ACF91%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_1.png%22%20alt%3D%22pastedImage_1.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1128026%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E********************************************************************************%3CBR%20%2F%3E*%20File%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20main.c%3CBR%20%2F%3E*%20Owner%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Peter%20Vlna%3CBR%20%2F%3E*%20Version%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201.7%3CBR%20%2F%3E*%20Date%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Oct-10-2017%3CBR%20%2F%3E*%20Classification%3A%20General%20Business%20Information%3CBR%20%2F%3E*%20Brief%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Example%20contains%20startup%20with%20PLL0%20200MHz%20as%20system%20clock%3CBR%20%2F%3E*%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20and%20demonstrates%20reset%20triggered%20on%20FCCU%20Alarm%20state%3CBR%20%2F%3E*%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20counter%20exppire.%3CBR%20%2F%3E********************************************************************************%3CBR%20%2F%3E*%20Test%20HW%3A%26nbsp%3B%20MPC57xx%3CBR%20%2F%3E*%20Maskset%3A%26nbsp%3B%201N83M%20(cut%202.0B)%3CBR%20%2F%3E*%20Target%20%3A%26nbsp%3B%20internal_FLASH%3CBR%20%2F%3E*%20Fsys%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20200MHz%20PLL0%20as%20system%20clock%3CBR%20%2F%3E********************************************************************************%3CBR%20%2F%3ERevision%20History%3A%3CBR%20%2F%3E1.0%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Oct-19-2015%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Peter%20Vlna%26nbsp%3B%26nbsp%3B%20Initial%20Version%3CBR%20%2F%3E1.1%26nbsp%3B%26nbsp%3B%20%26nbsp%3BNov-11-2015%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPeter%20Vlna%26nbsp%3B%26nbsp%3B%20Added%20PPL0%20200MHz%20as%20system%20clock%3CBR%20%2F%3E1.2%26nbsp%3B%26nbsp%3B%20%26nbsp%3BDec-02-2015%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPeter%20Vlna%26nbsp%3B%20Added%20Flash%20controller%20init%3CBR%20%2F%3E1.3%26nbsp%3B%26nbsp%3B%20%26nbsp%3BDec-02-2015%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPeter%20Vlna%26nbsp%3B%20Fixed%20system%20clock%20init%3CBR%20%2F%3E1.4%26nbsp%3B%26nbsp%3B%20%26nbsp%3BFeb-07-2017%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPeter%20Vlna%26nbsp%3B%20SWT0%20and%20SWT1%20disabled%20in%20startup%3CBR%20%2F%3E1.5%20%26nbsp%3B%26nbsp%3B%20%26nbsp%3BMay-31-2017%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPeter%20Vlna%26nbsp%3B%20Fixed%20comments%20in%20AC6%20(CLKOUT)%3CBR%20%2F%3E1.6%20%26nbsp%3B%26nbsp%3B%20%26nbsp%3BOct-04-2017%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPeter%20Vlna%26nbsp%3B%20Added%20PIT%20%2B%20Interrupts%3CBR%20%2F%3E1.7%26nbsp%3B%26nbsp%3B%20%26nbsp%3BOct-05-2017%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPeter%20Vlna%26nbsp%3B%20FCCU%20EOUT%20test%20in%20Alarm%20state%20with%20SMC%3CBR%20%2F%3E*******************************************************************************%2F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fskins%2Fimages%2FCD8FDF836FCE0DCD759843D0E68C0057%2Fresponsive_peak%2Fimages%2Fimage_not_found.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CP%3E%3C%2FP%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1128027%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Example%20MPC5746R%20FCCU%20Alarm%20State%20GHS716%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1128027%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Peter%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EIn%20this%20example%2C%20you%20are%20using%20the%20functional%20muxing%20(MSCR%20registers)%20to%20confiure%20FCCU%20EOUT_0%2F1%20pins%20as%20below.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%20SIUL2.MSCR0_255%5B112%5D.R%20%3D%200x6%7C0x02000000%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%2F*%20FCCU%20EOUT_0%20%2C%20ODC%20push-pul%20*%2F%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20SIUL2.MSCR0_255%5B115%5D.R%20%3D%200x6%7C0x02000000%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%2F*%20FCCU%20EOUT_1%20%2C%20ODC%20push-pul%20*%2F%3C%2FP%3E%3CP%3EHowever%2C%20the%20recommended%20way%20to%20do%20this%20configuration%20is%20by%20DCF%20clients.%20--%20Chapter%26nbsp%3B1.2.10%20DCF_ERROR0_PAD_SELECT%20DCF%20client%2C%26nbsp%3BMPC5746R%20Reference%20Manual%20Addendum%2C%20Rev.%202%2C%2010%2F2016.%26nbsp%3B%20What's%20more%2C%20in%20the%20attached%20(in%20RM)%20%22IO_Signal_Description%20and%20Input_Multiplexing_Tables%22%2C%20ERRORx%20is%20not%20listed%20as%20a%20muxing%20function%20which%20can%26nbsp%3Bbe%20assigned%20to%20these%20potential%20ERROR%26nbsp%3BOUT%20pins%20like%20PH%5B0%5D%20via%20SIUL2_MSCR%20registers.%20%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EBest%20Regards%3C%2FP%3E%3CP%3EYunan%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎09-24-2018 06:18 AM
Updated by: