cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

 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

0 Likes
Reply
6 Replies
Esteemed Contributor II

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

0 Likes
Reply
Anonymous
Not applicable

 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

0 Likes
Reply
Anonymous
Not applicable

 Here is the error message:

0 Likes
Reply
Honored Contributor II

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)

0 Likes
Reply
Anonymous
Not applicable

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. 

0 Likes
Reply
Esteemed Contributor II

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

0 Likes
Reply