Configuring SCB1 for SPI and driving SPIM:sclk_m to 24MHz

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

cross mob
TaH_4345166
Level 2
Level 2
5 likes given First like received First like given

Hello,

I have CY8CKIT-042 PSoC® 4 Pioneer Kit. I need to configure this kit as master with SPI mode and need to drive some slave device.

I have got some example code from code samples, which used SCB1 configured as SPI(master) and have tested loopback(MOSI to MISO) which worked fine.

Now I need to configure SCB1_SPI as master which drives 24MHz to slave, as below.

pastedImage_1.png

But I am unable to do it. I have configured SPI as below. As per the TRM, this configuration must produce 24MHz clock for SPI but it is driving only 4MHz.

pastedImage_2.png

But in the clock section, I can see 24MHz for SPIM_SCBCLK.

pastedImage_3.png

Why there is a difference in SPIM_SCBCLK(24MHz) and SPIM:sclk_m(4MHz) which is driving?

Any other configurations, which are affecting the desired frequency of SPI? Please suggest.

Any suggestion should be grateful.

0 Likes
1 Solution
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hi Tajpeer, 

Data rate of SPI equals to SPIM_SCBCLK divided by Oversampling.

Thanks,

Ryan

View solution in original post

0 Likes
1 Reply
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hi Tajpeer, 

Data rate of SPI equals to SPIM_SCBCLK divided by Oversampling.

Thanks,

Ryan

0 Likes