Subversion Repositories NaviCtrl

Rev

Rev 384 | Go to most recent revision | Show entire file | Ignore 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              
-
 
532
                SSC_Speed(2000);
-
 
Line -... Line 531...
-
 
531
                // here is the right place to inrease the SPI baud rate to maximum              
-
 
532
 
-
 
533
        SSC_Speed(2000);
533
                SSC_Enable(); // set SD_CS high
534
        SSC_Enable(); // set SD_CS high
534
 
535
 
535
                // read CID register
536
               // read CID register
-
 
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
536
                result = SDC_GetCID((u8 *)&SDCardInfo.CID);
546
                       result = SDC_GetCID((u8 *)&SDCardInfo.CID);
-
 
547
               }
-
 
548
       
537
                if(result != SD_SUCCESS)
549
               if(result != SD_SUCCESS)
-
 
550
               {
538
                {
551
                       UART1_PutString("Error reading CID.\r\n");
539
                        UART1_PutString("Error reading CID.\r\n");
552
                       goto end;
Line 540... Line 553...
540
                        goto end;
553
               }
541
                }
554
 
542
       
555
       
543
                // read CSD register
556
                // read CSD register