Difficult to solve issue. As a matter of fact, there are a couple of thousands SPI interfaces running on Cypress PSoCs in the world. So there might be no inherant error.
Can we have some more information, please:
Cypress KIt (which one?) or self-made PCB?
How do you check the bit-flipping? Pictures??
Can you please post your complete project or a shortened version that shows the error so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Hi Bob and thanks for the fast reply.
I thought I did add my bundle? Adding it now.
It is our PCB and I was testing it by looping on a write/read to a register that allows full write on all 8 bits, incrementing a counter after each read, breaking on each time, if the LSB was Zero it would flip to a One, no other bits would flip.
I just solved it by switching from the ECO to the IMO, I had tried slowing down the ECO, but that did not work, so I am assuming the IMO is a more stable clock and it was a clock jitter issue, any thoughts on that?
Bigger question, why the SPI only works at 1.5Mhz, on either clock, very odd? Slower and I get one clock out and then nothing, faster and it reverts to 1.5Mhz actual data rate?
The data rate can be modified by changing the oversampling parameter.
Data rate = SCB Clock frequency/ Oversampling.
The component will try to compute the scb clock frequency required based on the data rate and oversampling parameter that you enter in the GUI. You will be able to achieve higher data rates by decreasing the oversampling factor for a given SCB clock frequency.
ECO could lead to bad accuracy in case of improper load capacitance as seen by the oscillator . This can be tuned to achieve better clock accuracy (0 ppm) as described section 4.1 Crystal Tuning Procedure for Designs with PSoC 4/PRoC BLE Devices in the app note: PSoC /PRoC BLE Crystal Oscillator Selection and Tuning Techniques.
You can refer to the article ECO Capacitance Trim Values for EZ-BLE™ Modules - KBA218990 to load the right ECO trim value for your EZ_BLE module.