2015-07-29 09:45 PM
I work the SPI1 normally,
but cannot work on other 2,3,4....i think F401 have SPI2,3,4 right?i via dma and setting follow my setting in SPI1i try SPI4, DMA channel 5 stream 3,4 for tx rx. but no output.the stdperiph lib seems to be V1.0.0. do i need another lib for that? #discovery #stm32f4 #spi #error2015-07-30 12:06 AM
STD periph for F4xx series is 1.5.1 out at least now. In V1.0.0 is not supported SPI > 3.
And, do you have GPIO configured OK for your SPI? And clock enabled for SPI?I'm sure you have problem with SPI initialization. First make sure SPI works, then go to DMA!2015-07-30 12:32 AM
THX,
I set as SPI1 is OK, so the IO and Clock config is ok i thinkV1.0.0 not support SPI >3, but i use SPI2 still not work, Let me try again,So i have to change the lib to V1.5.1 for SPI 4?Where could i get the lib?2015-07-30 06:40 AM
Presumably you have the firmware release for the F401 Discovery board
More generally the F4 series has it's Standard Peripheral Library bundled with the DSP library code. Here's that, Red Download button at the bottom of the page.http://www.st.com/web/en/catalog/tools/PF257901
F401 is a seriously feature reduced F4, not sure what peripheral count it has with respect to SPI, you'd have to double check the Data Sheet2015-07-30 06:42 AM
Make sure you enable the SPI clock on the correct APB bus, and the DMA Channel/Stream associations are correct at all points they are used, or status tested/cleared.
2015-07-30 08:36 PM
Thx,
I have some silly questions,1. do i need to delete the original disco stdperiph lib>?2. how to add the new lib in to my original project? i follow the readme.txt but i realize that the lib have the main itself, is it a project already.?p.s. I am using Eclipse. luna2015-07-31 06:27 AM
Can't really help you with Eclipse, with Keil you could just expand the archive in it's own directory and then copy the existing project into the Project directory, allowing all the relative paths to the library files, and include files to remain consistent.
It's not clear if you need the newer libraries or not, I posted the link in response to you wanting to know where they are on the web site. You'd need to confirm the SPI you're attempting to use is present on the part, which you could do via the Data Manual, or by reviewing the startup_stm32f4xxyyzz.s and looking at the vector table to see if there is an IRQHandler for SPIx2015-07-31 09:43 AM
i try SPI4, DMA channel 5 stream 3,4 for tx rx. but no output.
The Reference Manual RM0090 (Rev 9 to hand) clearly indicates that the SPI4_RX/TX are ONLY supported on STM32F42xxx and STM32F43xxx parts. See Note (1) DMA2 Request Mapping.