AnsweredAssumed Answered

stm32 spi

Question asked by Nerobov.Yuliy on Nov 10, 2015
Latest reply on Nov 10, 2015 by waclawek.jan
Hi.
I am tying to connect my STM32F4 (or F1) with external ADC. 
Data from ADC can be received by SPI after ADC set "ready" flag.
So the task for controller is to read by SPI 16 bit data on external event.
The easiest way I've tried is:
- enable SPI in "external event" handler,
- disable SPI in "16 bits recieved" after reading data.
The problem is that on the high enough SPI clock frequency, SPI has time to start generating more 16  clock pulses before SPI diasbling command occurs. So I have two "16 bits recieved " exeptions instead of the correct one.
I've got some ideas how to solve the problem, but they are little rough.
Can somebody please tell me the way to solve the problem. 
I particularly appreciate the hardware solution of the problem. 

Outcomes