Commit Graph

34 Commits (d82f084f11fc968fe70dd19280595c7f3b5e98c1)

Author SHA1 Message Date
Deepika d82f084f11 Retry command sending on SD card
Sometimes card is busy programming multiple blocks and responds with 0xFF
i.e. response. Re-trying 3 times to send the command.
2017-06-27 14:01:46 -05:00
Deepika a7f23635a4 Added pre-erase command to boost multiple write block performance 2017-06-27 14:00:44 -05:00
Deepika 04e1a57c2d Added more debug statements 2017-06-27 13:59:29 -05:00
Deepika a0dd8cd45d SPI block read/write calls
1. Used SPI block read/write calls
2. Corrected SD write response handling (different for single and multiple
   block writes)
2017-06-27 12:32:42 -05:00
Deepika d9c055bf93 Added timer functions for busy wait while loops 2017-06-27 08:40:44 -05:00
Deepika 06136a0386 Cleanup
1. Additional debug level to trace SD commands and response.
2. Added space after if statements.
2017-06-23 15:38:01 -05:00
Deepika 25652a50cd Replaced busy wait while loop with timers 2017-06-23 15:37:26 -05:00
Deepika df8e085ee3 Proper response and error handling done 2017-06-23 13:03:24 -05:00
Deepika 22d7e4063f Multiple block write command added 2017-06-22 11:08:22 -05:00
Deepika f066339b80 Multiple block read command added 2017-06-21 16:19:46 -05:00
Deepika ae280d99e1 pulled in capacity issue changes 2017-06-21 15:04:49 -05:00
Deepika 99f3d25f44 Removed hardcoded values for block size 2017-06-21 15:00:47 -05:00
Deepika c890e0cfc7 Updated Init function
Modified initialization flow as per spec diag 7-2
Keep track of card status
block size supported is 512 bytes
Updated read/write functions to use correct block size
2017-06-21 14:16:28 -05:00
Deepika 547da1b24c Using _cmd for _go_idle_state funciton 2017-06-21 12:16:22 -05:00
Deepika e68d54efd0 Replaced _cmd58 with common _cmd function 2017-06-21 11:21:45 -05:00
Deepika e10c59d134 Added response type handling for _cmd 2017-06-21 11:11:47 -05:00
Deepika 27ceeee5b5 Single command function call for all commands supported
5. Separated SPI functionality in different function call.
6. Used enums for existing commands using _cmd function.
2017-06-21 10:56:39 -05:00
Deepika fbd1faf0b1 Single command function call for all commands supported.
1. Added enum for all commands supported.
2. Added error codes
3. Command Response defines
4. SPI Data Read/Write defines
2017-06-21 09:59:01 -05:00
Deepika fa885f4b68 Cleanup of SPI related code
3. Removed redundant function _cmdx
2017-06-20 17:03:59 -05:00
Deepika a26b3bca61 Cleanup of SPI related code
1. Added function to select/deselect the device
2. Init function for SPI
2017-06-20 16:41:23 -05:00
Deepika f462bb6b5a capacity of card to be calcualted from csd [69,48] 2017-06-20 13:36:06 -05:00
Simon Hughes 5830844aa3 Incorporated review feedback for simplfied _go_idle_state() implementation with 1ms wait between response queries. 2017-04-06 12:47:47 +01:00
Simon Hughes 88fecd54d6 Fix for armmbed/sd-driver issue 4: SDCard Initialisation fails for ESFS test cases on first time initialisation. 2017-04-05 13:32:44 +01:00
Simon D Hughes 3b0529a81e Merge pull request #1 from ARMmbed/g-fix-size-const
Fix const attribute mismatch on size function
2017-04-05 11:28:45 +01:00
Simon D Hughes e2fc4fcc44 Removing SPIBlockDevice module as present in spiflash-driver repository. 2017-03-28 17:14:58 +01:00
Christopher Haster aabeb8c7d1 Fixed const attribute mismatch on size function 2017-03-20 17:08:20 -05:00
Simon Hughes a8c85d30af Fixing SDBlockDevice::size() and SPIFBlockDevice::size() to implement BlockDevice::size() const change. 2017-03-14 17:45:48 +00:00
Simon Hughes b2fb488376 Updated README.md to include worked exmaples and restructuring of information. 2017-03-09 18:04:25 +00:00
Simon Hughes 58c52d3c82 Fixing url references 2017-03-07 17:29:00 +00:00
Simon Hughes a3484e095a Fixed fopen and basic test cases to use renamed mbed_retarget.h, and updated filesytem readme. 2017-03-07 17:19:10 +00:00
Simon Hughes 50dd8c3983 STORAGE: updated sd-driver README.md and POSIX file API README.md. 2017-02-28 18:18:12 +00:00
Simon Hughes 7e223bdaeb Ported mbed 2 FAT32 filesysetm test cases to mbed 5 tests in basic.cpp. 2017-02-24 18:12:16 +00:00
Simon Hughes b939ebca60 Added mbed_app.json support for definitions of SPI pin names for SDCard support, the default configuration being for the CI test shield plugged into the Arduino header. 2017-02-17 17:53:12 +00:00
Simon Hughes 9e5cca3be0 Adding SD driver (SDBlockDevice module) and associated test cases (basic, fopen) moved from mbed-os. 2017-02-14 16:54:49 +00:00