XMC4500, SPI002 Baud Rate > 10Mbaud

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User7989
Level 2
Level 2
Hi,

I need to configure SPI002 to 20MHz ( = 20Mbaud for standard full-duplex operation mode? )

But the desired baud rate of SPI002 can only be configured to maximum 10 Mbaud by the UIEditor of Dave3.

According to the reference manual is the maximum baud rate = fpB / 2. I haven't found the definition of fpB, but i assume that it's the system frequency which is set to 120MHz.

Can someone please explain what's correct, and if it's possible to achieve 20MHz.

/Anders
0 Likes
5 Replies
Not applicable
Dear andersr,

I configure 20MHz in my program, use this:

SPI001_ConfigType SPIConfig;

SPIConfig.Mode = SPI001_STANDARD_FULLDUPLEX;
SPIConfig.HBMode = SPI001_LSB;
SPIConfig.ClkPol = SPI001_CLK_POL0;
SPIConfig.ClkPh = SPI001_CLK_PHASE0;
SPIConfig.BaudRate = 20000000;
SPIConfig.LeadTrailDelay = SPI001_ONE_SCLK_PERIOD;
SPIConfig.NextFrameDelay = SPI001_ONE_SCLK_PERIOD;
SPIConfig.WordLen = 8;
SPIConfig.FrameLen = 8;
SPIConfig.CESelected = 1;
SPI001_Configure(&SPI001_Handle0,&SPIConfig);

But the waveform is a little bit worst, you can check attached.



0 Likes
User7989
Level 2
Level 2
Hello Smarley and thanks for your reply.

A manual override of the generated values as you suggest is an option. The waveforms are awful. Maybe using a different pad class or driver mode solves it!?

Anyway. I would like to know if the 10MHz limit is set for some reason, before i try implementing the fix.
0 Likes
Not applicable
Sure, good question, I will wait for this answer too.
I need a safe communication.
0 Likes
Not applicable
I measure again, with a batter scope and probe.
The signal with 20Mhz is very good, square.
0 Likes
Not applicable
Hi andersr and smarley,

Different pad have different speed grade.
The speed for pad A1 can up to 6MHz, pad A1+ for up to 25MHz and pad A2 up to 80MHz.
Please refer to the device datasheet for more info and to know which pin is on which pad.
0 Likes