Calculate MSCR number in SIUL

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate MSCR number in SIUL

Jump to solution
120 Views
Contributor I

Hi,

I'm trying to use MCAL 4.3.1 to use FlexCAN. I'm using MPC5748G. I have made the configurations on EB Tresos 24.0.1.

I confuse about this parameter of FlexCAN_0_CAN0RX:

PortPinPcr

Description: Used to specify port configuration register: SIUL I/O Pin Multiplexed Signal
Configuration Registers (MSCR number).

Range: >=0 and <=263.

But in file: IO_Signal_Description_and_Input_Multiplexing_Tables_Rev6.xlsx (attached in MPC5748G Reference Manual):

PortLVDS Pair PortSIUL MSCR#MSCR SSSFunctionModuleDescriptionDirection
PB[1] 170000_0000GPIO[17]SIUL2 I/O
PB[1]  0000_0001E0UC_31_YEMIOS0 O
PB[1]  0000_0010E2UC_5_YEMIOS2 O
PB[1]  -WKPU[4]WKPU I
PB[1]  -CMP0_3CMP0 I
PB[1] 5430000_0010E0UC_31_YEMIOS0 I
PB[1] 5890000_0010E2UC_5_YEMIOS2 I
PB[1] 7000000_0010CAN0RXFlexCAN_0 I
PB[1] 7120000_0001LIN0RXLIN_0 I

=> SIUL MSCR number of FlexCAN_0_CAN0RX is 700 (Port PB[1]). It's out of range (>263).

So, how should I use the correct number of MSCR in this case?

Best Regards,

Thuan Le

 

1 Solution
90 Views
NXP TechSupport
NXP TechSupport

Hi,

 

to set PB1 as CAN0RX two registers need to be configured; set IBE bit of respective MSCR register and put right SSS value into IMCR register, i.e.

SIUL2.MSCR[17].B.IBE = 1; /* Pad PB1: Enable pad for input */
SIUL2.IMCR[700-512].B.SSS = 2; /* CAN0_RX: connected to pad PB1 */ 

 

How this is done in Tresos, not sure.

 

BR, Petr

View solution in original post

0 Kudos
3 Replies
111 Views
NXP TechSupport
NXP TechSupport

Hi,

 

substract 512 from given value, thus 700-512.

 

BR, Petr

0 Kudos
101 Views
Contributor I

Hi Petr,

Thank for your support.

But in the file "IO_Signal_Description_and_Input_Multiplexing_Tables_Rev6.xlsx", the maximum value of SIUL MSCR is 1020 (for port PD[15]). I think 1020-512 out of range too (>263).

Best Regards,

Thuan

 

0 Kudos
91 Views
NXP TechSupport
NXP TechSupport

Hi,

 

to set PB1 as CAN0RX two registers need to be configured; set IBE bit of respective MSCR register and put right SSS value into IMCR register, i.e.

SIUL2.MSCR[17].B.IBE = 1; /* Pad PB1: Enable pad for input */
SIUL2.IMCR[700-512].B.SSS = 2; /* CAN0_RX: connected to pad PB1 */ 

 

How this is done in Tresos, not sure.

 

BR, Petr

View solution in original post

0 Kudos