I am using a CY8CKIT-050 PSoC5 with PSoC Creator 4.0 Update 1. I downloaded the example design SPI_Design01. In Device Selector I changed the device from CY8C38 series (PSoC3) to my CY8C5868AXI-LP035 chip.
No output displayed on the LCD.
For diagnosis, I added the board's two LEDs to the design. In main.c I turn one LED on just before the while loop and the other LED just after the while loop. The first LED lights but the second does not. This shows that the hang is in the while loop. I temporarily changed the & in the while loop to && and displayed garbage output, of course. With && ANY bit in the Status could satisfy the condition. This shows that SPIS_STS_SPI_DONE bit is never set.
I set a breakpoint at the while loop and stepped through. The last code executed was in SPIS.c lines 416 to 433. Control returned to the while loop.
I have jumper wires connecting:
m_miso to s_miso ( P0 to P0 )
m_mosi to s_mosi ( P0 to P0 )
m_sclk to s_sclk ( P0 to P0 )
m_ss to s_ss ( P0 to P0 )
Does anyone have suggestions or time to try my build? I have attached the Archive complete file.
Thanks, Bob. Very strange. I removed the wires and replaced them with other wires and carefully checked. No change. So I moved the project to the CY8CKIT-059 and I still have the same problem. Very strange. I will try to post a picture of my board with wiring in the morning. I am in -7 Universal Time.
I am sure I made some simple dumb mistake I am not seeing. Bob, I took your project and removed each internal wire and replaced each with a I/O pin. Then I added physical wires to the board. I attached a jpg file showing: Photo of my 059 board with the little 0.1" (2.5mm) jumpers on the female headers of P0; Also, the board diagram from the Quick Start Guide; And the cydwr diagram. I used an Ohm meter to check continuity of the pin connections on the bottom of the board. They look good.
I added a LED after the while loop but we never arrive there. If I turn on the LED before the while statement, it lights. I have the same problem on the CY8CKIT-050 board so the problem must be in my PSoC Creator configuration. If anyone sees my mistake, please let me know. Otherwise I could open a case with Cypress.
I checked your project on PSoC Creator4.0 Update1 on CY8CKIT-050.
I only changed the port pin no. of Pin_LED_1 signal according to kit to P6_3.
The LED glowed as expected,I then even debugged the code and found everything is working as expected.When i debugged the code removing the sclk connection between master and slave ,the LED is not glowing(LED_write API is placed after the while loop in this case)
Thus,this appears as a hardware issue.
Thank you ANKS. Interesting. Two things I will try. When I unlock the SPI pins, Creator likes to place them on banks P3 and P12. I will try to use those pins. Second, I have a second 059 board to try.
I resolved the problem by unlocking the SPI pins from bank P0. I let Creator place them where it liked. It works now. The external wiring is messier but it works.
I connected :
m_mosi P3.7 to s_mosi P15.0
m_miso P12.1 to s_miso P12.3
m_sclk P3.5 to s_sclk P12.2
m_ss P15.3 to s_ss P15.1