How to configure MPC5748G Master SPI2 to 40MHz using the SDK with Processor Expert?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to configure MPC5748G Master SPI2 to 40MHz using the SDK with Processor Expert?

ソリューションへジャンプ
576件の閲覧回数
davidanderle
Contributor II

Hello,

I've been trying to configure SPI2 on the 176-pin package of the MPC5748G to 40MHz clock rate in S32DS v2.1. Although Processor Expert accepts this clock figure, the output clock is capped at 20MHz. What I mean by this is any baud rate I chose above 20MHz will be limited to 20MHz. Setting anything below that works perfectly fine. I am using the recommended external clocks and MPC5748G_SDK_Z4_0 3.0.0 SDK.

It is worth mentioning that I'm using DMA on both Tx and Rx and that my SPI mode is CPOL=0, CPHA=1.

Could someone please help me identify what might be wrong in my setup?

Thanks!

0 件の賞賛
1 解決策
552件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

check how CTAR register is finally configured and if it equals equations in CTAR description. Maybe just DBR is not set, I guess it is not set in the driver at all.

BR, Petr

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
550件の閲覧回数
davidanderle
Contributor II

Hi PetrS, 

You are right, the DBR bit is not set at all in the driver. I've created a simple patch for the clock prescale calculator and now I can see the 40MHz clock output. Thanks for highlighting this! Is there maybe an opensource git repository I could do a pull request for this code change?

 

0 件の賞賛
553件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

check how CTAR register is finally configured and if it equals equations in CTAR description. Maybe just DBR is not set, I guess it is not set in the driver at all.

BR, Petr

0 件の賞賛