- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
I am implementing an SPI Master to my PSoC 4 project.
The SPI slave used require the SS to be held low for two clock cycles after each transaction, before bringing it back high.
Has anyone got any suggestions as to how i could do this without using a 'control register' to manipulate the SS line?
All the Best,
Katrine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may write directly to the pin without using a control register. pulling pin low before master action and release it (after some delay) when the transmission is done.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob,
Thank you for getting back to me. I have tried this but when I do I get an error when i try to program the device.
That is, the code will compile just fine, but when i try to use the miniprog to program the device I get: "FAILED! Error in row 54..."
The only difference between the code which i can program just fine and the code which fails to program is the added :
SS_Pin_Write(0);
before SPI write transaction and after
SS_Pin_Write(1);
Any suggestions as to why I would have this problem with the programming?
All the Best,
Katrine
- 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
What happens when you change exactly this line back and then try to program again? (I cannot imagine why such a code change should affect the programming)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My apologize for not getting back to you sooner.
I created a new project and built the same code again and it worked fine.
The original project keeps working and not working at random. I.e. I could insert the lines which caused the programmer to crash, uncomment the same line as the only change and it would work. So still a mystery why this is, but at least I have a working project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you create a MyCase (on top of this page "Support&Community->Technical Support->Create a MyCase) and submit the projects to Cypress for analyzation? Probably an error within Creator prevents the project from beeing programmed correctly.
Additionally. will you please keep us informed of the progress / results?
Bob