MPC5746R LINFLEXD Baudrate Setting

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

MPC5746R LINFLEXD Baudrate Setting

1,373 Views
David_Swain
Contributor II

I am attempting to use the LINFLEXD_1 channel to communicate with a remote PC at 57600 baud. Initially I set the LINCLK to use the 80MHz PHI clock from PLL0 divided by 5 (15MHz) and calculated the values for LINIBRR = 17 amd LINFBRR = 6 which according to the formula in the reference manual, section 43.4.2.8, "Baud Rate Generation", should give me the required 57600 baud, but it does not.

To remove some of the potential unknowns I changed the AC0_SC to select the XOSC = 20MHz. Leaving the divider at 5 (giving a 4MHz LINCLK) I recalculated LINIBRR=4 and LINFBRR=6 but to my surprise the resultant baud rate was approximate 10 times the required rate. For a test I changed LINIBRR to 40 and the resultant baud rate fell to approximately 57600 baud.

I would be grateful if anyone could suggest either what I am doing wrong or a reason for this very unexpected behaviour. 

0 Kudos
Reply
3 Replies

1,357 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

seems your LIN protocol clock operates in system clock synchronous mode and LINCLK is actually connected to the Synchronous System Clock Selector / Clock Divider 1 (SXBAR_CLK). See e.g below...
https://community.nxp.com/t5/Digital-Signal-Controllers/ticket/m-p/895510

BR, Petr

0 Kudos
Reply

1,342 Views
David_Swain
Contributor II
Thanks for the prompt reply but I don't think this is the answer, I wish it was. I am using the NXP development board MPC58XX and the MPC5746R daughter board. But if this is the case why should changing the LIN_CLK to XOSC change the behaviour. I will have a look at the ticket you sent a link to and check the jumpers on the development board just to be certain. One thing I forgot to mention is that I had connected the LIN_CLK to PH0/PHI via aux_clk_sel_0.dc4 and just changing this to use XOSC caused the measured baud rate to change. As I did not change the system clock selector I don't see why the measured baud rate should have changed.
0 Kudos
Reply

1,315 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

so please share simplified project so we can check setting and test it on the board.

BR, Petr

0 Kudos
Reply