XMC1402 SPI clock rate will not update using Dave App

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

cross mob
Not applicable
I generated a SPI MASTER DAVE APP for an XMC1402-F064x0064 MCU. Using the configuration GUI, I set the bus speed to 4MHz. Using the Pin Mapping GUI, I set the SCLKOUT pin to be P3.2 and the MOSI pin to be P3.3.

When I view either the SCLKOUT or MOSI pin on the scope, the clock speed appears to be around 6.667MHz. No matter what value I set the "Desired bus speed" in the GUI, the output clock is always about 6.667Mhz.

After every change: re-run the Dave solver, generate Dave code, clean project, rebuild all.

3124.attach
3125.attach
3126.attach
0 Likes
1 Reply
DRubeša
Employee
Employee
First solution authored First like received
Hi,

can you please check the value of BRG and FDR register once the "XMC_USIC_CH_SetBaudrate" function is called? To check this by yourself, I recommend to set the breakpoint at line 170 inside of "xmc_usic.c" file and see what is written in BRG register.
3128.attach

and then see in the peripheral view mentioned registers:

3129.attach

Then, set some other value in GUI and regenerate code and do the same procedure and compare BRG and FDR register values. They should differ (BRG will most likely be the same but FDR should differ). Let me know how it went.

Best regards,
Deni
0 Likes