Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

specific memory access to sd - ovverride SPI


  • Please log in to reply
2 replies to this topic

#1 emence

emence

    Member

  • Members
  • PipPip
  • 17 posts

Posted 29 August 2012 - 01:28 PM

Hello!

Is there a way to reconfigure the SPI pins for the onboard microSd?
I want to use the sd card as external flash storage without using a very slow filestrem.

I need to allocate memory on the sd and then write to it without creating a file.

can i use
SPI.Configuration x = new SPI.Configuration(....

and how can i access the PA21/PGMD9 Pin that is used for Chipselect?
or would it be easier to configure the register of the µC to setup the SPI?
Do i need to modify the firmware?

Thanks!

#2 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 29 August 2012 - 01:51 PM

You would probably need to modify the firmware to achieve what you want as the file system (FAT) is initialised when the sd card is inserted (note the small micro switch on the socket) triggers an interrupt, which does quite a lot behind the scenes. It may be easier for you to create a a shield which has some flash on it which you can use as you want then use that as a buffer to write to the SD card. Nak.

#3 emence

emence

    Member

  • Members
  • PipPip
  • 17 posts

Posted 29 August 2012 - 02:00 PM

You would probably need to modify the firmware to achieve what you want as the file system (FAT) is initialised when the sd card is inserted (note the small micro switch on the socket) triggers an interrupt, which does quite a lot behind the scenes.


So that's how it works!

It may be easier for you to create a a shield which has some flash on it which you can use as you want then use that as a buffer to write to the SD card.


I used an ArduinoMega2560, with a dataflash chip over SPI. That worked really well. But addressing a Dataflash, also means that reading and writing only works in pages of 512 bytes. and that can get complicated and inefficient really easy, when you need to address one specific byte of an image..

Reading and writing single bytes is very easy thanks to the filestream... but it's too dam slow.


How would one tingle with the firmware? is there an example i could look at?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.