2 #ifndef LIBPROPELLER_SDSAFESPI_H_ 3 #define LIBPROPELLER_SDSAFESPI_H_ 7 #define YIELD() __asm__ volatile( "" ::: "memory" ) 10 #define RET_IF_ERROR_INT if(HasError()){return error;} 11 #define RET_IF_ERROR if(HasError()){return;} 12 #define THROW_INT(value) {SetErrorCode((value)); return error;} 13 #define THROW(value) {SetErrorCode((value)); return;} 45 static const int kCardTypeMMC = 1;
46 static const int kCardTypeSD = 2;
47 static const int kCardTypeSDHC = 3;
49 static const int kNoError = 0;
51 static const int kErrorCardNotReset = -1;
52 static const int kError3v3NotSupported = -2;
53 static const int kErrorOcrFailed = -3;
54 static const int kErrorBlockNotLongAligned = -4;
56 static const int kErrorAsmNoReadToken = 100;
57 static const int kErrorAsmBlockNotWritten = 101;
59 static const int kErrorSpiEngineNotRunning = -999;
60 static const int kErrorCardBusyTimeout = -1000;
73 return Start(basepin, (basepin + 1), (basepin + 2), (basepin + 3));
84 int Start(
const int pin_do,
const int pin_clk,
85 const int pin_di,
const int pin_cs) {
92 waitcnt((CLKFREQ >> 6) + CNT);
94 mask_do = 1 << pin_do;
95 mask_di = 1 << pin_di;
96 mask_cs = 1 << pin_cs;
97 mask_clk = 1 << pin_clk;
98 mask_all = mask_cs | (1 << pin_clk) | mask_di;
100 volatile uint8_t * ldat = dat();
101 ((
int *) & ldat[1172])[0] = pin_do;
102 ((
int *) & ldat[1184])[0] = mask_do;
103 ((
int *) & ldat[1176])[0] = pin_clk;
104 ((
int *) & ldat[1180])[0] = pin_di;
105 ((
int *) & ldat[1188])[0] = mask_di;
106 ((
int *) & ldat[1192])[0] = mask_cs;
107 ((
int *) & ldat[1200])[0] = 9;
109 ((
int *) & ldat[1196])[0] = mask_all;
114 for (
int i = 0; i < 4096; i++) {
115 OUTA |= 1 << pin_clk;
116 OUTA &= ~(1 << pin_clk);
119 spi_block_index = CNT;
122 for (
int i = 0; i < 10; i++) {
124 TmpA = SendCommandSlow(Cmd0, 0, 0x95);
130 for (
int jk = 0; jk < 4; jk++) {
138 while (ReadSlow() != 0xFF) {
144 SendCommandSlow(Cmd12, 0, 0x61);
152 THROW_INT(kErrorCardNotReset);
156 if (SendCommandSlow(Cmd8, 426, 135) == 1) {
159 if ((ReadSlow32() & 0x1ff) != 0x1AA) {
161 THROW_INT(kError3v3NotSupported);
167 while (SendCommandSlow(Acmd41, ((1 << 30)), 0x77)) {
172 if (SendCommandSlow(Cmd58, 0, 0xFD) != 0) {
173 THROW_INT(kErrorOcrFailed);
178 if (ReadSlow32() & (1 << 30)) {
179 card_type = kCardTypeSDHC;
180 ((
int *) & ldat[1200])[0] = 0;
182 card_type = kCardTypeSD;
187 if (SendCommandSlow(Acmd41, 0, 0xE5) < 2) {
189 card_type = kCardTypeSD;
190 while (SendCommandSlow(Acmd41, 0, 0xE5)) {
195 card_type = kCardTypeMMC;
196 while (SendCommandSlow(Cmd1, 0, 0xF9)) {
202 SendCommandSlow(Cmd16, 512, 0x15);
206 SendCommandSlow(Cmd59, 0, 0x91);
214 ((
int *) & ldat[1212])[0] = (0b00100 << 26) | (pin_di << 0);
216 ((
int *) & ldat[1220])[0] = (0b00100 << 26) | (pin_clk << 0);
218 ((
int *) & ldat[1216])[0] = CLKFREQ >> (1 + 2 + 3);
221 const int idle_limit = 125;
222 ((
int *) & ldat[1256])[0] = CLKFREQ / (1000 / idle_limit);
225 ((
int *) & ldat[1204])[0] = (int) (&spi_buffer_address);
226 ((
int *) & ldat[1208])[0] = (int) (&spi_block_index);
229 spi_engine_cog = (cognew((
int) (&(*(
int *) & ldat[0])), (
int) (&spi_command)) + 1);
231 if (spi_engine_cog == 0) {
232 THROW_INT(kErrorSpiEngineNotRunning);
235 while (spi_command != (-1)) {
243 void ReadBlock(
const int block_index,
char * buffer_address) {
244 if (spi_engine_cog == 0) {
245 THROW(kErrorSpiEngineNotRunning);
248 if ((
int) buffer_address & 0x3) {
249 THROW(kErrorBlockNotLongAligned);
252 spi_block_index = block_index;
253 spi_buffer_address = buffer_address;
255 while (spi_command ==
'r') {
258 if (spi_command < 0) {
263 void WriteBlock(
const int block_index,
char * buffer_address) {
264 if (spi_engine_cog == 0) {
265 THROW(kErrorSpiEngineNotRunning);
268 if ((
int) buffer_address & 0x3) {
269 THROW(kErrorBlockNotLongAligned);
271 spi_block_index = block_index;
272 spi_buffer_address = buffer_address;
274 while (spi_command ==
'w') {
278 if (spi_command < 0) {
295 if (spi_engine_cog) {
297 while (spi_command ==
'z') {
308 if (spi_engine_cog) {
309 cogstop(spi_engine_cog - 1);
320 return error != kNoError;
331 int GetError(
void)
const {
348 volatile int spi_command;
349 volatile int spi_block_index;
350 volatile char * spi_buffer_address;
356 void SetErrorCode(
const int abort_code) {
377 int SendCommandSlow(
int command,
int value,
int crc) {
379 if (command & 0x80) {
382 int ReplyA = SendCommandSlow(Cmd55, 0, 0x65);
395 SendSlow(command, 8);
398 if (command == Cmd12) {
409 }
while ((ReplyB & 0x80) && (Time_stamp--));
413 void SendSlow(
int value,
const int bits_to_send) {
414 value = __builtin_propeller_rev(value, 32 - bits_to_send);
416 for (
int i = 0; i < bits_to_send; i++) {
423 value = ((unsigned) value) >> 1;
433 int ReadSlow32(
void) {
435 for (
int i = 0; i < 4; i++) {
453 for (
int i = 0; i < 8; i++) {
456 result += result + ((INA & mask_do) ? 1 : 0);
458 if ((CNT - spi_block_index) > (CLKFREQ << 2)) {
459 THROW_INT(kErrorCardBusyTimeout);
468 int GetSeconds(
void) {
469 if (spi_engine_cog == 0) {
470 THROW_INT(kErrorSpiEngineNotRunning);
474 while (spi_command ==
't') {
477 return spi_block_index;
480 int GetMilliseconds(
void) {
481 if (spi_engine_cog == 0) {
482 THROW_INT(kErrorSpiEngineNotRunning);
486 while (spi_command ==
't') {
489 int milliseconds = (spi_block_index * 1000);
490 milliseconds = (milliseconds + (((int) spi_buffer_address * 1000) / CLKFREQ));
495 static const int Cmd0 = 0x40 + 0;
496 static const int Cmd1 = 0x40 + 1;
497 static const int Acmd41 = 0xC0 + 41;
498 static const int Cmd8 = 0x40 + 8;
499 static const int Cmd9 = 0x40 + 9;
500 static const int Cmd10 = 0x40 + 10;
501 static const int Cmd12 = 0x40 + 12;
502 static const int Cmd13 = 0x40 + 13;
503 static const int Acmd13 = 0xC0 + 13;
504 static const int Cmd16 = 0x40 + 16;
505 static const int Cmd17 = 0x40 + 17;
506 static const int Cmd18 = 0x40 + 18;
507 static const int Cmd23 = 0x40 + 23;
508 static const int Acmd23 = 0xC0 + 23;
509 static const int Cmd24 = 0x40 + 24;
510 static const int Cmd25 = 0x40 + 25;
511 static const int Cmd55 = 0x40 + 55;
512 static const int Cmd58 = 0x40 + 58;
513 static const int Cmd59 = 0x40 + 59;
515 static volatile uint8_t * dat() {
516 static volatile uint8_t data[] = {
517 0x2f, 0xf1, 0xbf, 0xa0, 0x31, 0xf3, 0xbf, 0xa0, 0x2b, 0xed, 0xbf, 0xa0, 0x01, 0x80, 0xfe, 0xa4,
518 0xf0, 0x81, 0x3e, 0x08, 0xf1, 0x8b, 0xbe, 0xa0, 0xa4, 0x66, 0xfd, 0x5c, 0xf0, 0x81, 0xbe, 0x08,
519 0x00, 0x80, 0x7e, 0xc3, 0x06, 0x00, 0x78, 0x5c, 0x72, 0x80, 0x7e, 0x86, 0x1d, 0x00, 0x68, 0x5c,
520 0x77, 0x80, 0x7e, 0x86, 0x2d, 0x00, 0x68, 0x5c, 0x7a, 0x80, 0x7e, 0x86, 0x16, 0x00, 0x68, 0x5c,
521 0x74, 0x80, 0x7e, 0x86, 0x2e, 0x6f, 0x2a, 0x08, 0x2d, 0x71, 0x2a, 0x08, 0x00, 0x80, 0xfe, 0xa0,
522 0xf0, 0x81, 0x3e, 0x08, 0x06, 0x00, 0x7c, 0x5c, 0x7a, 0x82, 0xfe, 0xa0, 0x01, 0x76, 0xfe, 0xa4,
523 0x01, 0x84, 0xfe, 0xa4, 0x35, 0x96, 0xfc, 0x5c, 0x41, 0x81, 0xbe, 0xa0, 0xf0, 0x81, 0x3e, 0x08,
524 0x06, 0x00, 0x7c, 0x5c, 0x2e, 0x85, 0xbe, 0x08, 0x42, 0x7f, 0xbe, 0xa0, 0x01, 0x7e, 0xfe, 0x80,
525 0x3b, 0x7f, 0x3e, 0x86, 0x72, 0x78, 0x6a, 0x86, 0x25, 0x00, 0x68, 0x5c, 0x72, 0x82, 0xfe, 0xa0,
526 0x35, 0x96, 0xfc, 0x5c, 0x10, 0x78, 0xfd, 0x58, 0xb4, 0x8a, 0xfd, 0x5c, 0x41, 0x81, 0xbe, 0xa0,
527 0xf0, 0x81, 0x3e, 0x08, 0x72, 0x82, 0xfe, 0xa0, 0x01, 0x84, 0xfe, 0x80, 0x35, 0x96, 0xfc, 0x5c,
528 0x06, 0x00, 0x7c, 0x5c, 0x2e, 0x85, 0xbe, 0x08, 0x11, 0x78, 0xfd, 0x58, 0xb4, 0x8a, 0xfd, 0x5c,
529 0x41, 0x81, 0xbe, 0xa0, 0xf0, 0x81, 0x3e, 0x08, 0x77, 0x82, 0xfe, 0xa0, 0x35, 0x96, 0xfc, 0x5c,
530 0x06, 0x00, 0x7c, 0x5c, 0x42, 0x77, 0x3e, 0x86, 0x3c, 0x83, 0x2a, 0x86, 0x42, 0x00, 0x68, 0x5c,
531 0x77, 0x78, 0x7e, 0x86, 0x5a, 0xc4, 0xe8, 0x5c, 0x72, 0x78, 0x7e, 0x86, 0x53, 0xac, 0xe8, 0x5c,
532 0x77, 0x82, 0x7e, 0x86, 0x57, 0xb2, 0xe8, 0x5c, 0x72, 0x82, 0x7e, 0x86, 0x50, 0xa4, 0xe8, 0x5c,
533 0x7a, 0x82, 0x7e, 0x86, 0x4c, 0x9e, 0xe8, 0x5c, 0x42, 0x77, 0xbe, 0xa0, 0x01, 0x76, 0xfe, 0x80,
534 0x41, 0x79, 0xbe, 0xa0, 0x77, 0x82, 0x7e, 0x86, 0xf0, 0x48, 0xea, 0x5c, 0x72, 0x82, 0x7e, 0x86,
535 0xc6, 0xde, 0xe9, 0x5c, 0x7a, 0x82, 0x7e, 0x86, 0x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xa0, 0x8d, 0x46, 0xfd, 0x5c,
547 0x80, 0x7c, 0x7e, 0x63, 0x77, 0x7e, 0xf2, 0xe4, 0x3e, 0x83, 0x96, 0xa4, 0x00, 0x00, 0x7c, 0x5c,
548 0x30, 0x7f, 0xbe, 0xa0, 0x8d, 0x46, 0xfd, 0x5c, 0xff, 0x7c, 0x7e, 0x86, 0x7d, 0x7e, 0xd6, 0xe4,
549 0x00, 0x00, 0x7c, 0x5c, 0x29, 0xe9, 0xbf, 0x64, 0x00, 0xfa, 0xff, 0xa0, 0x80, 0xf6, 0xff, 0x58,
550 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24,
551 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x00, 0xf6, 0xff, 0xa0,
552 0x00, 0x00, 0x7c, 0x5c, 0x01, 0xf8, 0xff, 0xa4, 0x00, 0x7c, 0xfe, 0xa0, 0xc0, 0xfa, 0xff, 0x58,
553 0x40, 0xf6, 0xff, 0x58, 0xf2, 0x51, 0x3e, 0x61, 0x01, 0x7c, 0xfe, 0x34, 0xf2, 0x51, 0x3e, 0x61,
554 0x01, 0x7c, 0xfe, 0x34, 0xf2, 0x51, 0x3e, 0x61, 0x01, 0x7c, 0xfe, 0x34, 0xf2, 0x51, 0x3e, 0x61,
555 0x01, 0x7c, 0xfe, 0x34, 0xf2, 0x51, 0x3e, 0x61, 0x01, 0x7c, 0xfe, 0x34, 0xf2, 0x51, 0x3e, 0x61,
556 0x01, 0x7c, 0xfe, 0x34, 0xf2, 0x51, 0x3e, 0x61, 0x01, 0x7c, 0xfe, 0x34, 0xf2, 0x51, 0x3e, 0x61,
557 0x00, 0xf6, 0xff, 0xa0, 0x01, 0x7c, 0xfe, 0x34, 0x00, 0xf8, 0xff, 0xa0, 0x00, 0x00, 0x7c, 0x5c,
558 0xf1, 0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xc0, 0xfa, 0xff, 0x58, 0x40, 0xf6, 0xff, 0x58, 0xf2, 0x51, 0x3e, 0x61,
570 0x08, 0x7c, 0xfe, 0x34, 0xf2, 0x51, 0x3e, 0x61, 0x02, 0x7c, 0xfe, 0x70, 0xf2, 0x51, 0x3e, 0x61,
571 0x04, 0x7c, 0xfe, 0x70, 0xf2, 0x51, 0x3e, 0x61, 0x08, 0x7c, 0xfe, 0x70, 0xf2, 0x51, 0x3e, 0x61,
572 0x10, 0x7c, 0xfe, 0x70, 0xf2, 0x51, 0x3e, 0x61, 0x20, 0x7c, 0xfe, 0x70, 0xf2, 0x51, 0x3e, 0x61,
573 0x40, 0x7c, 0xfe, 0x70, 0xf2, 0x51, 0x3e, 0x61, 0x00, 0xf6, 0xff, 0xa0, 0x80, 0x7c, 0xfe, 0x70,
574 0xd2, 0x7e, 0xfe, 0xe4, 0x00, 0x7c, 0xfe, 0x3c, 0x3e, 0x01, 0xbc, 0xa0, 0x33, 0xcd, 0xbd, 0x80,
575 0xd0, 0x7a, 0xfe, 0xe4, 0x00, 0xf8, 0xff, 0xa0, 0x8d, 0x46, 0xfd, 0x5c, 0x8d, 0x46, 0xfd, 0x5c,
576 0x8d, 0x46, 0xfd, 0x5c, 0x00, 0x72, 0xfe, 0xa0, 0x00, 0x82, 0xfe, 0xa0, 0x00, 0x00, 0x7c, 0x5c,
577 0x46, 0xed, 0xfd, 0x50, 0x80, 0x7a, 0xfe, 0xa0, 0x7c, 0x00, 0xfd, 0x5c, 0xf8, 0xf9, 0xff, 0x58,
578 0x81, 0x18, 0xfd, 0x5c, 0x00, 0xfa, 0xff, 0xa0, 0x46, 0xf9, 0xbf, 0xa0, 0x01, 0xec, 0xfd, 0x80,
579 0x18, 0xf8, 0xff, 0x24, 0x80, 0xf6, 0xff, 0x58, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24,
580 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24,
581 0x01, 0xf8, 0xff, 0x24, 0x11, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24,
582 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24,
583 0x01, 0xf8, 0xff, 0x24, 0x11, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24,
584 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24,
585 0x01, 0xf8, 0xff, 0x24, 0x11, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24,
586 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24, 0x01, 0xf8, 0xff, 0x24,
587 0x01, 0xf8, 0xff, 0x24, 0x00, 0xf6, 0xff, 0xa0, 0xf6, 0x7a, 0xfe, 0xe4, 0x8d, 0x46, 0xfd, 0x5c,
588 0x8d, 0x46, 0xfd, 0x5c, 0x8d, 0x46, 0xfd, 0x5c, 0x1f, 0x7c, 0xfe, 0x60, 0x05, 0x7c, 0x7e, 0x86,
589 0x00, 0x82, 0xea, 0xa0, 0x65, 0x82, 0xd6, 0xa4, 0x8d, 0x46, 0xfd, 0x5c, 0x00, 0x72, 0xfe, 0xa0,
590 0x00, 0x00, 0x7c, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
591 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
592 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
593 0x40, 0x42, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x02, 0x00, 0x00,
594 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
595 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
596 0x00, 0x00, 0x00, 0x00,
605 #endif // LIBPROPELLER_SDSAFESPI_H_ int Start(const int pin_do, const int pin_clk, const int pin_di, const int pin_cs)
int Start(const int basepin)
bool HasError(void) const