AnsweredAssumed Answered

Meaning of different versions of MPC5748G.h

Question asked by Michael Binz on Aug 9, 2019
Latest reply on Aug 12, 2019 by Peter Vlna

I found in the example projects references to two versions of the file MPC5748G.h

 

  • One is part of the beta sdk:  S32_SDK_BETA_2.9.0\platform\devices\MPC5748G\include\MPC5748G.h. Its header is: 

/*
** ###################################################################
** Processor: MPC5748G
** Reference manual: MPC5748G RM Rev. 6, 10/2017
** Version: rev. 1.4, 2018-01-15
** Build: b180116
**
** Abstract:
** Peripheral Access Layer for MPC5748G
**

...

 

  • The other one is used in a sample project for led blinking.  Its header is:

/**************************************************************************
* FILE NAME: MPC5748G.h COPYRIGHT (c) NXP 2017 *
* REVISION: 6.0.2 All Rights Reserved *
* *
* DESCRIPTION: *
* This file contains all of the register and bit field definitions for *
* the MPC5748G. *
*========================================================================*
* UPDATE HISTORY *
* REV AUTHOR DATE DESCRIPTION OF CHANGE *
* --- ----------- --------- --------------------- *
* 0.1.0 P.A. 24-SEP-12 -First release. *
* *

 

The LED-project using the 6.0.2 file above has code like:

void ADC1_Init(void) {
ADC_1.MCR.B.PWDN = 1; /* Power down for starting module initialization */
ADC_1.MCR.B.OWREN = 1; /* Enable overwriting older conversion results */
ADC_1.MCR.B.MODE = 1; /* Scan mode (1) used instead of one shot mode */
ADC_1.MCR.B.ADCLKSEL = 1; /* ADC clock = FS80 bus clock (80 MHz here) */
ADC_1.MCR.B.PWDN = 0; /* ADC_1 ready to receive converstion triggers */
ADC_1.MCR.B.NSTART = 1; /* Initiate trigger for normal scan */
}

This is incompatible with the rev1.4 of mpc5748g.h and a migration seems complicated.

 

Which one of these files should be used for new projects?

If the first include (rev 1.4) is to be used: How to migrate code like the above?

 

Best wishes,

Michael.

Outcomes