2013-07-24 07:33 AM
Hi all,
I had good experiences on STM32F4 peripherals, and I look now for a competitive price STM32 reference (I found STM32L152C6 is the cheapest, but I'd appreciate your feedback a lot) that could match that features :- 3.3V operations- 1x i2c at 400 kHz (DMA+int : I coded exisiting driver version for STM32F4, it could be nice that it could be reused ;).- Standby mode with low power (ultra low prefered but not critical).- 1x 16 bits Timer, a few EXTIO...- a few eeprom would have been niceIn a first mode:- only one peripheral on a SPI bus, that produce DATA by DMA read operation,- SDIO bus for recording that DATA on a �SD card (4 Gb and more), with a maximum write speed of 1 Mb/s, with DMA, and with the lowest footprint on RAM (what RAM amount do you think is ok, please ?), will it be a good starting place for STM32L152C6 ?In a second mode :- the DATA recorded on �SD during the first mode are transfered via USB High speed, with a mass storage declaration (new to that) : - is there any library/example I can start with for that purpose ? - What HSE value would you recommend ?- and with firmware flashing capability (by USART only ? Or is it possible by a special file on �SD ?) : is there any library/example I can start with for that purpose ?Thanks in advance for your answers #sd-spi-sdio #usb-dma-sdio2013-07-24 03:35 PM
2013-07-25 02:29 AM
Thanks a lot STONE-32,
That's the kind of feedback I need to find the best match. My project is cost first, I should have say that.As I'm new to USB and SDIO, I probably didn't took good criteria.So, if I can limit my project to USB 2.0 FS, it will be 12 Mb/s capable, is that true ? It could be ok for me.At this speed (USB 2.0 FS), is there any recommandation in the choice of a good (necessary regarding datasheet) but cheap HSE ?Now about SPI mode for the µSD card operations : in a previous project on STM32F4, I wrote a driver in SPI DMA for a µSD (with FatFs), and encounter some problems with the write operation. It happens rarely the Card (class 4) stay blocked for as long as 28 ms between 2 write operations. But it was perhaps due to a bad PCB, and electrical considerations, what do you think ?I solved the problem by using huge RAM footprint to write only full cluster to the card :With a sector size of 64 per cluster : it gave me : 64x512 = 32768 Bytes per cluster. I was writing only 32768 B/s, and with 2 temp of that size (DMA), the RAM footprint was too high for that simple task.I believe I will need a lot of feedback to find the best compromise for that 1 Mb/s write operation, because if SPI is enough, low cost STM32L100 could be enough for me...