Interfacing PSoC5LP with TDC GP22

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

cross mob
lock attach
Attachments are accessible only for community members.
rolo_1953106
Level 1
Level 1

Hi. I am trying to interconnect the psoc5lp with the tdc gp22 module (time to digital converter) to measure time differences between two signals.

A spi communication test must be performed to verify the correct operation of the gp22.

First, I must configure the 7 configuration registers (from 0 to 6). Then according to the data sheet, to carry out the test, an address must be sent (0xB5) and the gp22 must return the MSB of the register 1. In our case, MSB = 0x21

The problem is that I get different values in each cycle of the loop, which indicates that it is not working correctly. Could you help me determine if the problem is in the code or in the configuration of the spi module?

I enclose the workspace bundle, the data sheet and a application note of gp22.

Thank you

Rodrigo

0 Likes
3 Replies
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Have you monitored the data lines of SPI bus? Is the data/timing correct?

Thanks,

Ryan

0 Likes
lock attach
Attachments are accessible only for community members.

Hello, excuse the delay. Regarding your question, yes, I monitored the 4 lines: MOSI, SCLK and SS work correctly according to the mode configured in the SPI module (Phase = 1, Pol = 0). However, the MISO line remains low, and does not return any signal.

Thanks,

Rodrigo.

0 Likes

Hi Rodrigo,

Didn't find errors in the code.

Suggest changing the clock speed and checking if it can change something;

And you can try using another PSoC as a slave to double-check if the slave can receive data.

Thanks,

Ryan

0 Likes