Page 3 of 8
Re: SDIO port to STM32F4x
Posted: Mon Jan 23, 2012 7:32 pm
by Giovanni
Very well, is the driver functional for F1 family too?
Giovanni
Re: SDIO port to STM32F4x
Posted: Tue Jan 24, 2012 6:57 am
by barthess
I can not test it on F1x. But driver use the same concepts as previous realization. Platform specific code is DMA related and hidden in #if#endif blocks.
One question about naming conventions STM32_SDIO_XXXXX or STM32_SDC_XXXXX ?
Re: SDIO port to STM32F4x
Posted: Tue Jan 24, 2012 7:18 am
by barthess
Code: Select all
/**
* @brief Driver configuration structure.
* @note It could be empty on some architectures.
*/
typedef struct {
uint32_t dummy;
} SDCConfig;
may be delete "uint32_t dummy;" at all?
Re: SDIO port to STM32F4x
Posted: Tue Jan 24, 2012 9:11 am
by Giovanni
The driver is "SDC" so it should be named accordingly, empty structures are not standard C and some compilers warns about that.
Giovanni
Re: SDIO port to STM32F4x
Posted: Tue Jan 24, 2012 5:14 pm
by barthess
1) What about SDC_BUSY_HOOK() and SDC_IDLE_HOOK() to easy realize "hdd led indicator"?
2) Now we can have a deal with RTC. I propose to add it support after finalizing of RTC code on F4/F2 platforms.
Re: SDIO port to STM32F4x
Posted: Tue Jan 24, 2012 6:57 pm
by Giovanni
Hi,
Better do not add macros in a LLD for things that can be done outside the driver, you can make a led blink without those, I can think several ways to do that. Adding options increases complexity and reduces maintainability.
Giovanni
Re: SDIO port to STM32F4x
Posted: Mon Mar 05, 2012 6:03 pm
by barthess
I create new branch from trunk. Code compiles without problems. I plans to concentrate efforts on test suit.
Re: SDIO port to STM32F4x
Posted: Mon Mar 05, 2012 6:16 pm
by Badger
Hi barthess,
Do you use pullups for SDIO on the F4? It's been a while since I looked into it, but as far as I can remember the F1 datasheet showed the pullups where as I couldn't find a similar diagram for the F4. I guess an extended request would be: can you provide details of how you've connected the SD card to the STM32F4 in SDIO mode?
Thanks!
Re: SDIO port to STM32F4x
Posted: Mon Mar 05, 2012 7:04 pm
by barthess
I connect it like in STM32-LCD board (connection identical for F1 and F4) from Olimex but without pullup resistors. You can found datasheet with diagrams on Olimex page. I do not observe any problems without external pullups but strongly recommend to insert them to be safe. In my case I just forgot about them when developing board.
Re: SDIO port to STM32F4x
Posted: Mon Mar 05, 2012 7:51 pm
by Badger
Thanks for the hint, I'll probably do my testing without them to see if I have success, and will try and find a resistor array for when I design a PCB! I'll order an SD card breakout so I can help with testing, I have lots of SD cards lying around
