2015-03-11 09:36 AM
I'm using stm32f4 Discovery board and planning to interface SD card via SPI , to achieve maxmimum throughput It'd be better to use DMA for block read/write.
Does ST provide any samples of FAT-FS implementation for STM32F4 discovery? #stm32 #stm32 #dma #dma #spi #spi #fatfs #fatfs #sd2015-03-11 09:55 AM
Does ST provide any samples of FAT-FS implementation for STM32F4 discovery?
Yes, just not using the connectivity you're choosing.So why would SPI be remotely more palatable than 1-bit SDIO? For examples to exist requires a strong driver, being slower, more complex and less efficient, usually stops most people.2015-03-12 04:02 AM
So I started porting FAT FS, And I've confusion
Commands and response are transmitted as 1 bytes to SD card, so if I initialize SPI using DMA by default each 1 bytes commands/response will be exchanged using DMA method, this will have a overhead of initializing the DMA structure each time the commands are send.So can you please guide me how to use DMA exactly in my scenario, ie; use DMA only while block transfer is taking place. I mean when to initialize DMA and de-init it.2015-03-12 11:35 AM
So can you please guide me how to use DMA exactly in my scenario, ie; use DMA only while block transfer is taking place.
I'm really not looking to get pulled into your development effort. I've posted SPI RX/TX example code in the past, I suspect it's going to be a pain, as you'd have to pump data out while reading back to your data buffers. There are specific SPI registers/commands to disable/enable DMA connectivity of the Rx/Tx channels.