cancel
Showing results for 
Search instead for 
Did you mean: 

how to read SD Card 2 files at the same time by STM43F103RC

forest xu
Associate II
Posted on June 11, 2018 at 06:36

I have a project that is a series speakers.  

There are 2 speakers master speaker (MS)  and slave Speaker (SS)

I want to design the MS as following function.

1) use phone as controller through Bluetooth

2) MS with SD card a list of song stored in the SD card

3) by Phone App. I can select Sone A to play on MS

    at the same time select Sone B to send it to SS by Bluetooth.

    both Song A and B are stored in the SD card.

(The songs are special and not stored in the Phone)

Thank you!

the Key question is

can STM32F103RC read Sone A from SD to send to DSP to play 

and Read Song B to send to Bluetooth module to broadcast  at the same time ?

4 REPLIES 4
Posted on June 11, 2018 at 12:55

Fatfs can have multiple files open at once, but you will need to serialize access, either by using mutex or semaphores, or by keeping IO in a single thread.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
forest xu
Associate II
Posted on June 11, 2018 at 19:13

Hi, Clive:

Thank you for your answer.

I assigned this project to a design house 

they told me the F103 is not power enough and cannot complete the above task

They suggested to upgrade to STM32F4xx that is much expensive.

do you think so?

can you help provide more detail approach so I can convince them to keep STM32F103

or any other solution ?

Thank you very much 

Forest 

forest xu
Associate II
Posted on June 11, 2018 at 20:37

Hi, Clive:

by theory if the bandwidth A > B+C 

it could be possible, right?

I believe the audio stream is not so fast. it maybe Ok about 30Kbyte/s

even there is some decoding function in the STM32. it still enough power to deal.

Thank you for help

Forest 

0690X00000604e0QAA.jpg
Posted on June 11, 2018 at 19:23

Probably want an F103VE or F103ZE with an SDIO interface to the CARD, you can certainly read two file streams concurrently with SPI connectivity, but it is going to be much slower, the question really comes down to having sufficient bandwidth to do the tasks you want.

>>can you help provide more detail approach so I can convince them to keep STM32F103

That would be expensive I'm afraid.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..