cancel
Showing results for 
Search instead for 
Did you mean: 

TRF7960 STM32F407 SPI communication issue

pramuka
Associate II
Posted on December 14, 2017 at 04:10

Hi -

We are trying to integration TRF7960 with our custom hardware which has STM32F407 processor (via SPI). As per errata 1.1 on TRF7960, we need to switch the polarity of clock during write & read operation (Errata & work around link:

/external-link.jspa?url=http%3A%2F%2Fwww.ti.com%2Flit%2Fan%2Fsloa140a%2Fsloa140a.pdf

).

What is the best way to change SPI clock and data polarity without re-initialization of SPI between read & write cycles?

Thank you in advance. Looking forward for any help. 

Regards,

Piyush

#trf7960 #stm32f407 #rfid #spi-clkphase
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on December 22, 2017 at 20:46

Hello - 

SPI bit banging is a good idea. As we use it for several peripherals, we could not implement it in given time frame. 

The solution was to de-initialize and then re-initialize. The process sounds time consuming but is not. Its very fast so we could settle for it. 

Thanks all for your replies & participation.

View solution in original post

2 REPLIES 2
S.Ma
Principal
Posted on December 14, 2017 at 06:01

I've done this on STM32F437 to accelerate SWD from bitbang GPIO. Changing the polarity of the clock maximize the setup time hence the max speed. To do so, I did not disable the cell, I waited the cell was IDLE (busy bit) to flip the polarity (and the number of bits). Try it out.

I assume the SPI cell in your product does not have FIFO built-in the SPI.

Posted on December 22, 2017 at 20:46

Hello - 

SPI bit banging is a good idea. As we use it for several peripherals, we could not implement it in given time frame. 

The solution was to de-initialize and then re-initialize. The process sounds time consuming but is not. Its very fast so we could settle for it. 

Thanks all for your replies & participation.