IRQ's switched off when working on localflash?

31 Jan 2011

Can someone from the mbed team confirm if interrupts are disabled when doing operations on the local flash disk? I have made an SPI slave which works on interrupts when characters are coming in, and sometimes I see a buffer overrun when sending this data to an open file on the mbed's local storage, more sepcifically when I have just given a command to open a file or to read data from a file. I have a logic analyzer hooked up to my mbed, and trigger a digital out when I am in my ISR. It triggers whenever a byte arrives at the SPI port, but after sending a command to start reading, I do not see this for a brief period.

PS. I do not see this when doing the same on filesystems on a USB stick or SD card (using the CoolComponents breakout board).

31 Jan 2011

Hi Meindert,

Yes, that is exactly right. See the "Implementation Details" section LocalFileSystem handbook page for the implementation details:

The LocalFileSystem is basically the target delegating the file accesses to the mbed interface using a technique called semihosting, over JTAG; this is used for requesting a host (usually a debugger, in our case the interface) to do something on behalf of the target, and waits on a breakpoint during this time.

Hope that backs up what you are seeing. As you have identified, this is specific to the LocalFileSystem, which is great to get some file accesses tested or use for config files etc, but doesn't give the speed or capacity of a proper SD card or USB disk.


31 Jan 2011


Thanks for the quick reply. It is not a big problem for the application, I just wanted to have confirmation