<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SPI slave doesn&amp;#39;t transmit, STM32F407VE</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/36318/spi-slave-doesn-t-transmit-stm32f407ve</link><description> 
I have STM32F103C8 as a SPI master and a STM32F407VE as a SPI
slave. 
I haven&amp;#39;t worked with SPI enough to find optimal way to write
communication mechanism, and earlier work with SPI only on AVR and
Texas Instruments C2000 platforms, so STM32 is new</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: SPI slave doesn't transmit, STM32F407VE</title><link>https://community.arm.com/thread/70654?ContentTypeID=1</link><pubDate>Thu, 22 Mar 2018 04:56:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:00f4f138-dc59-4604-97e1-874f63270fa0</guid><dc:creator>Ivan Feoctistov</dc:creator><description>&lt;p&gt;&lt;p&gt;
Found and solved problem.&lt;br /&gt;
Slave was receiving command to get ready byte by byte. Every received
byte caused interrupt, and in the end of interrupt callback function
next receiving interrupt was enabled.&lt;br /&gt;
After handling interrupt all SPI flags resetting to normal state. So
when I was receiving dummy data from master - RxCallback was called,
and at the end of processing all SPI flags was reset automatically,
so slave couldn&amp;#39;t insert anything to SPI Tx register.&lt;br /&gt;
Now interrupts are enabling only if command still isn&amp;#39;t received. If
command to get ready received - only flag to get ready is setting on.
Data is pushed in function HAL_SPI_Transmit(), and after it stands a
function that waits SPI to transmit everything it has in buffers.
Only then I turn on SPI Rx interrupt.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>