- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you monitored the data lines of SPI bus? Is the data/timing correct?
Thanks,
Ryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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