cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding the issue of DSPI communication baud rate! Hope everyone can help solve it!

Bwang.3
Associate III

Hello everyone! I would like to ask about the DSPI baud rate setting for the SPC582BE1 microcontroller. As shown in the following figure, when using the SPC5828XX-RLA DSPI Test Application for Discovery routine, I found that the default setting for Baud Rate Prescaler is PRE5 and Baud Rate Divider is DIV2 The Baud Rate (Bit/s) is 8000000, and I used a logic analyzer to collect the SCK signal line of DSPI and found it to be 1.25MHz! I would like to ask how did this 1.25MHz come about? Can you tell me?

QQ图片20240520184824.jpgQQ图片20240520184844.jpgQQ图片20240520184835.jpgQQ图片20240520184840.jpg

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

the test SPC582Bxx_RLA DSPI Test Application for Discovery configures three configurations:

  • high speed @8000000 bps
  • low speed @125000 bps
  • low_speed_16 @125000 bps

in the main loop, the first two configurations are used in alternate way.

So, I suspect you are capturing the second DSPI transaction which is at 125000 bps.

Here the code in the application main loop:

Capture.JPG

Regards,

 

View solution in original post

4 REPLIES 4
AScha.3
Chief II

Hi,

i dont know your cpu...but:

> how did this 1.25MHz come about?

Obviously your clk setting is wrong.

You have 40M clk in ? But you have prediv 2 , so 20M ; and you set 80M as PLLin , but is 20M...set 20M here.

+

To check real clock, activate Clkout , check whats coming - and what it should be. Adjust your settings, until ok.

If you feel a post has answered your question, please click "Accept as Solution".

Hello,

the test SPC582Bxx_RLA DSPI Test Application for Discovery configures three configurations:

  • high speed @8000000 bps
  • low speed @125000 bps
  • low_speed_16 @125000 bps

in the main loop, the first two configurations are used in alternate way.

So, I suspect you are capturing the second DSPI transaction which is at 125000 bps.

Here the code in the application main loop:

Capture.JPG

Regards,

 

Just for info:

the formula to calculate the baud rate:

br = double_br * (DSPICLK0_CLK / (br_prescaler * br_divider));

where

  • double_br = 1 if double baud rate is NOT set
  • double_br = 2 if double baud rate is set

 

Best Regards

Thank you very much!