Commit Graph

32 Commits (10aac9f16207e81d0f231dfc9eef7ac88ad32c27)

Author SHA1 Message Date
Deepika af48ce3b86 Config options for timeout and retries for CMD 2018-03-14 10:56:14 -05:00
Deepika 51dc1d2b2c
Merge pull request #78 from ARMmbed/Update_license
Updating license and readme
2018-01-03 12:48:58 -06:00
Deepika 90e831f9af Updating license and readme 2018-01-02 15:06:59 -06:00
Deepika fa74a85836 Incorrect version number was checked for non-rtos config / mbed version -2
Version in mbed-os is different if RTOS is not present.
Not checking the version number explicitly for mbed-2, but will leave the warning
as few API changes were done, and tracking of version is not done for them in
mbed-2.
2018-01-02 11:37:29 -06:00
deepikabhavnani 0e21d07e5d Block size as uint32_t gave incorrect device size 2017-11-22 14:24:14 -06:00
Deepika 5df332930c
Merge pull request #70 from deepikabhavnani/mutex_rtos
Change mutex to PlatformMutex
2017-11-20 16:50:12 -06:00
Deepika dbc75efeb5 Change mutex to PlatformMutex 2017-11-20 15:29:53 -06:00
Deepika 63b45dc7e6 Merge pull request #57 from ARMmbed/g-trim
Remove erase in favor of trim
2017-10-06 13:15:36 -05:00
Christopher Haster 7a67bc5748 Incremented dependency to 5.6.1
Required for trim addition
2017-10-06 11:22:59 -05:00
Deepika c46d0779e7 Deselecting card between read/write ops caused issues
Deselecting card while it is busy programming and selecting again was causing
corruption (Illegal command) with slow speed cards. Will wait for read/write
operations to complete before deselecting the card.
2017-09-07 09:56:57 -05:00
Deepika 49262a39cd Merge pull request #58 from deepikabhavnani/sd_cmd12
Should not wait for card to be ready when sending stop command
2017-09-06 14:11:11 -05:00
Deepika 6c6a594c95 Force D0 enabled during device select 2017-08-30 15:48:01 -05:00
Deepika d4d1d87bf8 Should not wait for card to be ready when sending stop command 2017-08-29 13:14:56 -05:00
Christopher Haster 69f3902e95 Remove erase in favor of trim
For better or worse, erase in the block device API is intended for flash
erases, which is a low-level operation that must occur before every
write and limits the write size of the underlying blocks. This is
different than the erase size found in SD cards, which does not limit
the write size for blocks.

Following the standard set by ATA and the ioctl function, we are adding
a seperate operation for the SD card erase behaviour named trim.

See for more info:
https://en.wikipedia.org/wiki/Trim_(computing)
2017-08-28 15:56:57 -05:00
Deepika 1d3fa9db3a Merge pull request #55 from ARMmbed/g-softer-erase
Changed erase to just noop if erases are too small for erase command
2017-08-28 15:17:46 -05:00
Deepika d5671e2b39 Merge pull request #48 from ARMmbed/cmd41_init_issue
Fixed SD card intialization failure
2017-08-21 10:13:30 -05:00
Christopher Haster bab6699799 Changed erase to just noop if erases are too small for erase command
Since it's an optimization, we should only send the command if the range
of bytes being erased fits. get_erase_size should still report 512, and
the erase should just noop with <SECTOR_SIZE bytes being erased. If
filesystems erase a larger range (at least spiffs does this), the
optimization can kick in.
2017-08-18 11:12:39 -05:00
Deepika 0ac12a0251 Merge pull request #49 from LemonBoy/erase_size
Correct calculation of the erase sector size
2017-08-17 13:37:53 -05:00
LemonBoy 705462d321 Correct calculation of the erase sector size
The specification states that the real value is obtained by increasing
by one the value extracted from the csd register.
2017-08-17 17:18:44 +02:00
Deepika c7347c967c Merge pull request #50 from LemonBoy/sdcard-init-seq
Make the initialization sequence more flexible
2017-08-17 10:06:06 -05:00
LemonBoy 52f5e0d41a Make the initialization sequence more flexible
According to the SD specification v2.00 we this is the right way to
initialize a card using the v1 protocol in a forward-compatible way.
2017-08-14 16:46:38 +02:00
deepikabhavnani 1a02b0528c Fixed SD card intialization failure
Few SD cards were failing for CMD41 as device was not ready after CMD55.
Added busy delay loop to make sure device is ready and than proceed.
2017-08-12 00:11:36 -05:00
Deepika a1445562bc Checking for version, for OS master support 2017-08-10 09:53:58 -05:00
Deepika d94cb26883 Added version build error 2017-08-03 10:57:10 -05:00
Deepika 497aaaf915 SPI block read fix
Using fix from mbed-os core, where few devices were failing with
SPI block read, as default data on SPI was sent 0x00.
Using API 'set_default_write_value' to set the default tx fill data.
2017-07-17 11:05:06 -05:00
Deepika 954167fb40 Clear _is_initialized flag during deinit 2017-07-11 14:30:59 -05:00
Deepika 21e6f47aa4 Error handling for CMD9 2017-07-11 08:31:30 -05:00
Deepika cdbbea6c52 Fix: SD read failed for Strontium Card
CMD9 fails for few cards if spi.write is performed during deslect of card
 Card immediately sends start packet token, which goes missing in this dummy
 write to SPI. Should not clock SPI bus in deselect operation.
2017-07-10 15:59:40 -05:00
Christopher Haster 97248873a4 Added constructor parameter for frequency 2017-07-05 12:27:22 -05:00
Christopher Haster b11b635775 Added error propogation from frequency functions 2017-07-05 12:24:26 -05:00
Christopher Haster 15f33154c6 Renamed set_freq -> frequency 2017-07-05 12:19:29 -05:00
Simon Hughes 3fa6b88ef8 Repository re-organisation and cleanup to follow same structure as other mbed-os component repositories. 2017-07-05 11:45:11 -05:00