cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for a competitive STM32 reference

neoirto
Associate II
Posted on July 24, 2013 at 16:33

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 nice

In 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 ?)

http://nemuisan.blog.bai.ne.jp/?eid=192848

, 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-sdio
2 REPLIES 2
Nickname12657_O
Associate III
Posted on July 25, 2013 at 00:35

Dear stephane,

You need to re-check if really you need SDIO (SDMMC) peripheral for just writing up to 1Mbits/s. SPI is enough at that speed. then if USB high speed ( 480MBits) is a must. Check your package if these peripherals exists in low pin version 48 packages ''C''. USB high speed is only available in our F2 and some F4 lines where you need an external ULPI Phy to add in your BOM.  I would recommend to check out our STM32F103RE : full speed USB + SDIO available +  low price :)

Cheers,

STOne-32.

PS, you need to re-work your software from F4 as the DMA is a bit different and much more simple on F0,F1,L1 and F3 series
neoirto
Associate II
Posted on July 25, 2013 at 11:29

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...