MPC5748G ADC1_S[15] Channel Conversion Issue

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

MPC5748G ADC1_S[15] Channel Conversion Issue

3,268 Views
hongpingxu-b364
NXP Employee
NXP Employee

Hi,

 

This issue is reported from my customer, they use ADC1_P[9] (PD[5]) and ADC1_S[15] (PM[14]) in same group with same setting. They find that ADC1_P[9] channel work properly, but ADC1_S[15] channel can’t get target value.

As checked, we find SIUL2_MSCR[53] (PD[5]) is 0x00400000, but SIUL2_MSCR[206] (PM[14]) is 0x00000002.

The Port configuration for these to channel are same:

hongpingxub364_0-1736737405217.png

 

 

We also check the EB generated code, it looks OK.

============================================================

    /*Mscr ID, Mscr Value, Output Level, Direction, IsGpio, Direction Configurable,  Mode Changeable, Is Imcr Available, Imcr Id  */

    {(Port_InternalPinIdType)53, (uint32)0x00400000, (uint8)2, (uint8)0, (boolean)FALSE, (boolean)FALSE, (boolean)FALSE, (boolean)TRUE, (uint16)0.0},

 

    /*Mscr ID, Mscr Value, Output Level, Direction, IsGpio, Direction Configurable,  Mode Changeable, Is Imcr Available, Imcr Id  */

    {(Port_InternalPinIdType)206, (uint32)0x00400000, (uint8)2, (uint8)0, (boolean)FALSE, (boolean)FALSE, (boolean)FALSE, (boolean)TRUE, (uint16)0.0},

============================================================

 

If we insert a code to configure the SIUL2_MSCR[206] register later to 0x00400000. The ADC can work properly.

 

Could anyone share you experience to me, whether this is EB bug or something I missed.

Customer MCAL version is Autosar 4.3.1 RTM1.0.2. Enclosed is the EB port configuration file and code.

 

Best regards,

 

Hornby

0 Kudos
Reply
4 Replies

3,169 Views
hongpingxu-b364
NXP Employee
NXP Employee

Hi,

We can’t put breakpoint at line 543, the return message is: Line not found

hongpingxub364_0-1737341785550.png

BR,

Hornby

0 Kudos
Reply

3,244 Views
Nhi_Nguyen
NXP Employee
NXP Employee

Hi @hongpingxu-b364 ,

From driver I understand that driver just write value generated by configuration into MSCR and this value is correct. So, please send me the information as below:

Nhi_Nguyen_0-1736826719842.png

I want to find where can change this value.

Best regards,

Nhi

0 Kudos
Reply

3,164 Views
hongpingxu-b364
NXP Employee
NXP Employee

Hi,

 

We found the code of PM14 operation inside the Port_Siul2_Init function. We wonder whether any impact on ADC configuration?

hongpingxub364_0-1737342433686.png

 

0 Kudos
Reply

3,132 Views
Nhi_Nguyen
NXP Employee
NXP Employee

Hi @hongpingxu-b364 ,

I assume that u16PinIndex is 181, this is PM[14], it will ignore the command to write to register MSCR. So, MSCR_206 still keep old value. So, why did they have this code? From my point of view, they can check in their project, if PM14 used by debug for TMS as in comment, they will can't use it for ADC.

Best regards,

Nhi

0 Kudos
Reply