stm32 spi
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-11-10 2:26 AM
Posted on November 10, 2015 at 11:26
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. #stm32-spi
Labels:
- Labels:
-
SPI
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-11-10 2:41 AM
Posted on November 10, 2015 at 11:41
> disable SPI in ''16 bits recieved'' after reading data.
What???
If you set SPI to transfer 16-bit, it's one single write to the data register, wait until receiver ready, then a read from data register. Read the fine manual. JW