Unable to get 24MHz with SPI

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

cross mob
user_1669321
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

Hi,

I need to start the SPI at 400 kHz, and then to 24 MHz. However, I can only go to 12MHz.

Clk_Peri = 96 MHz

Clk_Slow = 48 MHz

SPI_oversample = 4

Clock_SPI_divider = 60 // 400 kHz

In my code, I do some transactions at 400kHz, then I change the Clock_SPI_divider to 1, which should give me 24 MHz. However, I only measure 12MHz.

Is there a limitation that any peripheral can only go to Clk_Peri / 2? If so, is the advertised 25MHz only available when oversampling = 2, which is only available when MISO is not used?

Thanks,

Fred

0 Likes
1 Solution
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi user_1669321​,

If you are using the API to set the divider, please set the divider value to 0 to divide by 1. The argument expects the parameter (divider - 1).

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
2 Replies
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi user_1669321​,

If you are using the API to set the divider, please set the divider value to 0 to divide by 1. The argument expects the parameter (divider - 1).

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes

Thanks Bragadeesh!

I think I just assumed that the PDL function was the same as the top design component (1-256), and didn't take the time to read the documentation.

0 Likes