Jump to content

Controlling sd card access between MSD driver and app


Duggle
 Share

Recommended Posts

Hi,

I'm using the mass storage driver similar to the example msd example, so that files on the sd card may be accessed at any time simply by plugging in a computer host via usb.

Is it possible to (I assume a semiphore is required) simultaneously access files by my mios32 application? I'm about to experiment using FILE_ functions <file.h> for file i/o.

I thought I'd ask the question. I'm kind of thinking that the app will need a switch to control which part has sd card file access enabled external_host<->app.

It would be nice if they could both have access to files any time.

thx.

Link to comment
Share on other sites

Unfortunately semaphores won't work, as the MSD driver handles SD Card accesses from an interrupt service routine.

Semaphores can only be used for FreeRTOS tasks.

I don't see a solution without overworking the USB and MSD driver.

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 2 weeks later...

Ive implemented this in my program from your code,TK.

The problem I've found with this, is when I type "msd on", I can't then type "msd off" (or anything) because the USB midi is off.

If I use MIOS Studio through GM5 on the PC ( and init with MIOS32_MIDI_DebugPortSet(UART0);) I have control as expected.

This is a pity because the faster uploading of code using USB is nice as well as the possibility of using the core with wireless usb link:

I think I heard that this is not a limitation with Mac (MIDI + COM +MSD at the same time)?

Link to comment
Share on other sites

Ca. two years ago, where I tried to combine MIDI+COM, it worked under MacOS, but caused a blue screen under Windows.

Meanwhile this combination is not working under MacOS anymore, I'm not sure why but haven't spent much debugging effort for this topic since this is a very exotic usecase anyhow.

I don't think that a MIDI+MSD combination will work in parallel, especially because it seems that Windows can only assign a single driver to a USB port.

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...