AnsweredAssumed Answered

Configuration Clock  with PE S32DS

Question asked by Lutz Köhler on Aug 16, 2018
Latest reply on Aug 22, 2018 by Lutz Köhler

Hello,

 

I use the S32DS with S32K144. In the Clock configuration from the PE you can select for the Functional Clock of LPSPI the SPLLDIV1_CLK.

In the Clock_S32K1xx-.h is followed defined

#define    CLK_SRC_OFF          0x00U             /* Clock is off */
#define    CLK_SRC_SOSC         0x01U             /* OSCCLK - System Oscillator Bus Clock */
#define    CLK_SRC_SIRC         0x02U             /* SCGIRCLK - Slow IRC Clock */
#define    CLK_SRC_FIRC         0x03U             /* SCGFIRCLK - Fast IRC Clock */
#define    CLK_SRC_SPLL         0x06U             /* SCGPCLK System PLL clock */
#define    CLK_SRC_SOSC_DIV1    0x01U             /* OSCCLK - System Oscillator Bus Clock */
#define    CLK_SRC_SIRC_DIV1    0x02U             /* SCGIRCLK - Slow IRC Clock */
#define    CLK_SRC_FIRC_DIV1    0x03U             /* SCGFIRCLK - Fast IRC Clock */
#define    CLK_SRC_SPLL_DIV1    0x06U             /* SCGPCLK System PLL clock */
#define    CLK_SRC_SOSC_DIV2    0x01U             /* OSCCLK - System Oscillator Bus Clock */
#define    CLK_SRC_SIRC_DIV2    0x02U             /* SCGIRCLK - Slow IRC Clock */
#define    CLK_SRC_FIRC_DIV2    0x03U             /* SCGFIRCLK - Fast IRC Clock */
#define    CLK_SRC_SPLL_DIV2    0x06U             /* SCGPCLK System PLL clock */

 

With the SPLLDIV1_CLK you select in the PCS of PCC the SPLLDIV2_CLK for LPSPI.

It is not possible to select SPLLDIV1_CLK for LPSPI.

 

In the configuration for the LPSPI in the PE  the SPLLDIV1_CLK is used for Calculation Baudrate and not the SPLLDIV2_CLK.

So you get a false Baudrate.

 

BR Lutz

Outcomes