Problem with MSCR and IMCR in SIUL2 module

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

Problem with MSCR and IMCR in SIUL2 module

1,953 Views
xinweichang
Contributor III

I saw in a 5748G LINFlex demo, to configure a pad as LIN1RX in 5748G should follow the step:

SIUL2.MSCR[39].B.IBE = 1;      /* Pad PC7: Enable pad for input */

SIUL2.IMCR[201].B.SSS = 1;     /* LIN1_RX : connected to pad PC7 */

However, I don't quite know how these two number come from. I looked up at the excel file attached to the 5748G reference manual, and found this:144377_144377.pngpastedImage_1.png

The Problem is how to choose the number? if according to this table, should it be:

SIUL2.MSCR[713].B.IBE = 1;      /* Pad PC7: Enable pad for input */

SIUL2.IMCR[713].B.SSS = 1;     /* LIN1_RX : connected to pad PC7 */

 

But with the second one, LIN frames cannot be transmitted, the DTF bit will not be set.(I haven't tried LIN Rx, only lin Tx)

The first one can sent out lin frame, I just don't know how the number is decided.

Labels (1)
Tags (1)
2 Replies

1,382 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

Your MSCR is 39 (this is for setting the input buffer).

SIUL2.MSCR[713].B.IBE = 1;

And then you want to set PC[7] as LIN1RX => input

So you need to configure IMCR [201].

In the table above in column SIUL_MSCR#  it is 713.

But there are only 512 MSCR registers and they are followed by 512 IMCR registers. (This is from historical reasons)

To set input LIN1RN on PC[7] you need to write 1 to SSS bit in IMCR register 201 (713 - 512 =201).

Use the same method for all inputs.

I know this is quite confusing.

Peter

1,382 Views
xinweichang
Contributor III

Thanks a lot. It really puzzled me for some days.

0 Kudos