Help - An SD card in SPI mode respect chip select?

  vivitern 07:31 24 Nov 2017

I have an application where I have a microcontroller (NXP LPC1343 atasheet:[click here which is connected to an FPGA via 16-bit SPI. There is also an SD card using the same SPI port (MISO/MOSI) but with a different CS/SS pin (both are active low, as per the SPI specification). One of the things I need to do is write data from the FPGA onto a file on the SD Card using FAT32, and this is the job of the microcontroller. The microcontroller is running FatFS, which I have gotten to work reliably by itself.

Because the microcontroller only has a small amount of RAM, only a small amount of data can be buffered at once. Hence, the micro has to read a buffer from the FPGA, change the SPI mode to 8-bit, and then write that data to the FATFS. Recall that in order to configure the SD card for SPI mode, a command must be sent while the SPI bus is running at 400 kHz, and a certain amount of waiting has to happen. Therefore, I would like to have to only perform the initialization once.

However, performing transactions on the FPGA even while holding CS high on the SD card seems to put the SD card into a weird state such that it needs to go through initialization again. This of course is undesirable, since the initialization may take several milliseconds, in order to write just 4 kB or so of data (again limited by the small RAM capability of my micro). As I need to write several megabytes as quickly as possible, this reduces performance from about 500 kB/s to less than 100 kB/s.

I'm aware that SD cards aren't technically fully SPI compliant, but how can this problem be fixed?

What is Markdown?

Markdown lets you add more formatting to your post. Simply type in your post and it will display as written.

If you wish to add bold or italic characters, add a hyperlink to another website, a heading or a horizontal line, simply use the relevent icons above the text input field.

A preview of your post will appear in the grey box below. If you make a change and you're not happy, simply press the back arrow icon to undo.

Post a Reply

4500

Elsewhere on IDG sites

Microsoft Surface Book 2 review

How To Use Color Range Masking

How to fix macOS High Sierra root bug - stop hackers accessing your Mac

Football : comment regarder la Coupe du monde de football 2018 ?

<rt id="xtkytUB"><small id="xtkytUB"></small></rt>
<tr id="xtkytUB"><optgroup id="xtkytUB"></optgroup></tr>
<tr id="xtkytUB"><optgroup id="xtkytUB"></optgroup></tr>
<tr id="xtkytUB"><optgroup id="xtkytUB"></optgroup></tr>
<acronym id="xtkytUB"></acronym>
<option id="xtkytUB"></option>
<acronym id="xtkytUB"><small id="xtkytUB"></small></acronym>
<sup id="xtkytUB"><small id="xtkytUB"></small></sup>
<acronym id="xtkytUB"></acronym>
  • 8932252913 2018-04-25
  • 9234262912 2018-04-25
  • 538182911 2018-04-25
  • 8807512910 2018-04-25
  • 151222909 2018-04-25
  • 4763212908 2018-04-25
  • 224692907 2018-04-25
  • 9451982906 2018-04-25
  • 2367382905 2018-04-25
  • 6815762904 2018-04-25
  • 263442903 2018-04-24
  • 3878762902 2018-04-24
  • 8611012901 2018-04-24
  • 6639942900 2018-04-24
  • 6251542899 2018-04-24
  • 3556072898 2018-04-24
  • 5131212897 2018-04-24
  • 8181242896 2018-04-24
  • 9627412895 2018-04-24
  • 231312894 2018-04-24
  • cheap jerseys | wholesale jerseys |