Tja1128 drive communicate

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

cross mob
MashRoom
Level 1
Level 1
First question asked Welcome!

Hi! I am trying to use the CY8C4146LQS-S433/QFN-40 with PSOC creater 4 and I want to ensure that the I have configure the SPI correctly.

My configuration:微信截图_20221130125038.png

TJA1128's datasheet:Tja1128's data sheet, SPI's format is on page 33 

With this configuration I can send and receive the data, but the data I receive is always equal to what I send . So I want to know whether the SPI I configuration was correct.

thank you.

0 Likes
1 Solution
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @MashRoom ,

Yes, you need to have the same CPHA and CPOL configuration at both the master and slave devices for SPI to work. The clock signal idles at logic 0, hence CPOL is 0. CPHA is 1 indicating that the data is sampled at the falling edge of the clock, and is passed/shifted on the rising edge.

"With this configuration I can send and receive the data, but the data I receive is always equal to what I send "

Can you explain more about your situation? Are you receiving the same information that is being sent?

Regards,
Nikhil

View solution in original post

0 Likes
1 Reply
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @MashRoom ,

Yes, you need to have the same CPHA and CPOL configuration at both the master and slave devices for SPI to work. The clock signal idles at logic 0, hence CPOL is 0. CPHA is 1 indicating that the data is sampled at the falling edge of the clock, and is passed/shifted on the rising edge.

"With this configuration I can send and receive the data, but the data I receive is always equal to what I send "

Can you explain more about your situation? Are you receiving the same information that is being sent?

Regards,
Nikhil

0 Likes