Meaning of different versions of MPC5748G.h

cancel
Showing results for 
Search instead for 
Did you mean: 

Meaning of different versions of MPC5748G.h

576 Views
michaelbinz
Contributor III

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.

0 Kudos
2 Replies

414 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

I can see that on our web is 6.0.2 and 1.4.

6.0.2 is latest one which is union based.

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

We have rev 1.4 which is struct based.

latest header is still in process according to reference manual 7. So for new project I would stick with 6.0.2 which will be easy to transfer to 7.x.x header once it comes alive.

regards,

Peter

PS: examples with 6.x.x headers are here:

https://community.nxp.com/docs/DOC-329623 

regards,

Peter

0 Kudos

414 Views
bitbingo
Contributor I

Hi,Peter

I have same question as the upper sir.Michael .During migration the example"Example MPC5748G eMIOS BCTU ADC trigger S32DS2.1"as you suggestted,there are also problems in MPC5748G.h( system platform explores).It seems like that the registers names in 1.4 version .h files in system are pointers,but the names in 4.0.0 or 6.0.2 are struct type,so there are many problems between auto-generate system files and example application files.

Could you give me some suggestions to solve the different version .h files problems and migrate the examples to the new MPC5748G application project? 

Thank you very much~

best regards

Bingo 

0 Kudos