Subversion Repositories NaviCtrl

Rev

Rev 384 | Rev 438 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 384 Rev 399
Line 527... Line 527...
527
                        goto end;
527
                        goto end;
528
        }
528
        }
Line 529... Line 529...
529
               
529
               
530
                SSC_Disable(); // set SD_CS high                                                                         
530
                SSC_Disable(); // set SD_CS high                                                                         
-
 
531
                // here is the right place to inrease the SPI baud rate to maximum              
531
                // here is the right place to inrease the SPI baud rate to maximum              
532
 
532
                SSC_Speed(2000);
533
        SSC_Speed(2000);
Line 533... Line 534...
533
                SSC_Enable(); // set SD_CS high
534
        SSC_Enable(); // set SD_CS high
534
 
535
 
535
                // read CID register
536
               // read CID register
536
                result = SDC_GetCID((u8 *)&SDCardInfo.CID);
537
               result = SDC_GetCID((u8 *)&SDCardInfo.CID);
-
 
538
               if(result != SD_SUCCESS)
-
 
539
               {
-
 
540
                       
-
 
541
                       UART1_PutString(" Set interface to low speed...");
-
 
542
                       SSC_Disable(); // set SD_CS high                                                                          
-
 
543
                       // here is the right place to inrease the SPI baud rate to maximum                
-
 
544
                       SSC_Speed(1000);
-
 
545
                       SSC_Enable(); // set SD_CS high
-
 
546
                       result = SDC_GetCID((u8 *)&SDCardInfo.CID);
-
 
547
               }
-
 
548
       
537
                if(result != SD_SUCCESS)
549
               if(result != SD_SUCCESS)
538
                {
550
               {
539
                        UART1_PutString("Error reading CID.\r\n");
551
                       UART1_PutString("Error reading CID.\r\n");
Line -... Line 552...
-
 
552
                       goto end;
540
                        goto end;
553
               }
541
                }
554
 
542
       
555
       
543
                // read CSD register
556
                // read CSD register
544
                result = SDC_GetCSD((u8 *)&SDCardInfo.CSD);
557
                result = SDC_GetCSD((u8 *)&SDCardInfo.CSD);