This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAPL138B-EP: MMCSD_FatfsConsole_lcdkOMAPL138 1-BIT BUS

Part Number: OMAPL138B-EP

Hi

I am trying to modify the MMCSD_FatfsConsole_lcdkOMAPL138_DMA_c674xExampleProject

to a MMCSD_BUS_WIDTH_1BIT;

I have modified the pinmux code and rebuilt the libraries

I have also added

 hwAttrsConfig.supportedBusWidth=MMCSD_BUS_WIDTH_1BIT;
 hwAttrsConfig.inputClk=25000000;

my serial output was:

Card inserted.
All tests have PASSED
0:>ls

I also tried MMCSD_lcdkOMAPL138_DMA_c674xTestProject

And this was my output

-----------------------------------------------------------
Test Details for test ID      = 13
Test Profile[13]: Description = Default Unit Test (Max speed)
Test Profile[13]: PowerCyle   = Required
Test Profile[13] Device Config : Mode        = SOC Default
Test Profile[13] Device Config : BusVoltage  = SOC Default
Test Profile[13] Device Config : BusWidth    = SOC Default
Test Profile[13] Device Config : Interrupt   = SOC Default
------------------------------------------------------------
DMA is enabled
Interrupts are disabled

Performing RAW mode read/write tests ..
Getting SD Card parameters
SD Card: BlockSize = 512,  BlockCount = 0x01ce0000, CardSize = 0x39c000000 bytes
RAW READ/WRITE: Writing test pattern (256 KB) to the SD card starting at sector 0x300000 in 1 block(s) 256 KB each
RAW READ/WRITE: Reading test pattern (256 KB) from the SD card starting at sector 0x300000 in 1 block(s) 256 KB each
RAW READ/WRITE: PASS: Read/Write Success for this size (256 KB)
RAW READ/WRITE: Writing test pattern (512 KB) to the SD card starting at sector 0x300000 in 1 block(s) 512 KB each
RAW READ/WRITE: Reading test pattern (512 KB) from the SD card starting at sector 0x300000 in 1 block(s) 512 KB each
RAW READ/WRITE: PASS: Read/Write Success for this size (512 KB)
RAW READ/WRITE: Writing test pattern (1024 KB) to the SD card starting at sector 0x300000 in 1 block(s) 1024 KB each
RAW READ/WRITE: Reading test pattern (1024 KB) from the SD card starting at sector 0x300000 in 1 blo

  • Hi,

    I think the log you posted is not complete. I can't see nothing wrong in the output you've posted.


    Best Regards,

    Yordan

  • Hi Yordan

    thanks for replying.

    On the FAT Console I cant get a directory listing or help it just sits on the drive letter

    Regards

    developerR

  • Hi Sahin / Yordan

    Have you been able to test this?

    Thanks

  • Hi developerR,

    Could you please check if you observe the same issue with the non-DMA version of the project? The reason I ask is because there is a known issue with the DMA version where the application will hang when more than 4 MB of data is transferred. 

    From Processor SDK Known Issues: Record ID PRSDK-5981

    We have not yet determined if this is the root cause of your issue but it would be good to rule this out. 

  • Hi Sahin

    For :

    MMCSD_FatfsConsole_lcdkOMAPL138_c674xExampleProject

    The output was

    Card inserted.
    All tests have PASSED
    0:>ls

    Thank you and regards

    developerR

  • Hi Sahin

    I tried the Beaglebone black MMCSD_FatfsConsole_bbbAM335x_DMA_armExampleProject

    I added the buswidth and clock parameters without recompiling the libraries and it worked perfectly

    #ifdef MMCSD_EDMA_ENABLED
        gEdmaHandle = (EDMA3_RM_Handle)edma3init(MMCSD_EDMACC_NUM, &edmaResult);

        if(MMCSD_socGetInitCfg(0,&hwAttrsConfig)!=0) {
            MMCSD_log ("\nUnable to obtain MMCSD config.Exiting. TEST FAILED.\r\n");
           return;
        }
        hwAttrsConfig.supportedBusWidth=MMCSD_BUS_WIDTH_1BIT;
        hwAttrsConfig.inputClk=25000000u;

        hwAttrsConfig.edmaHandle = gEdmaHandle;
        if(MMCSD_socSetInitCfg(0,&hwAttrsConfig)!=0) {
            MMCSD_log ("\nUnable to set config.Exiting. TEST FAILED.\r\n");
             return;
         }
    #endif

    thanks and regards

    developerR

  • Hi 

    Has anyone been able to test the MMCSD on the LCDK with the BUS_WIDTH_ONE setting?

    thank you

    developerR 

  • Hi developerR,

    I tested the MMCSD_FatfsConsole (non-DMA) example on the LCDK and it is passing. Please see logs below.

    I changed 

    (MMCSD_BUS_WIDTH_1BIT | MMCSD_BUS_WIDTH_4BIT)

    to 

    (MMCSD_BUS_WIDTH_1BIT)

    in MMCSD_soc.c. Have you made any modifications to the LCDK? I see you are configuring the input clk to 250Mhz (default clk is 150Mhz). Could you please explain the reasoning for this?

    Here are my passing logs:

    Card inserted.
    All tests have PASSED
    0:>ls
    D-HS- 2019/08/21 15:43         0  System Volume Information
    
       0 File(s),         0 bytes total
       1 Dir(s),   15207392K bytes free
    All tests have PASSED
    0:>help
    
    Available commands
    ------------------
    help : Display list of commands
    ls   : Display list of files
    cd: Change directory
    mkdir: Create directory
    rm   : Delete a file or an empty directory
    pwd  : Show current working directory
    cat  : Show contents of a text file : cat <FILENAME>
           Write to a file : cat <INPUTFILE> > <OUTPUTFILE>
           Read from UART : cat dev.UART
           Write from UART : cat dev.UART > <OUTPUTFILE>
    All tests have PASSED
    0:>mkdir "test"
    mkdir: 0:/"test"
    All tests have PASSED
    0:>ls
    D-HS- 2019/08/21 15:43         0  System Volume Information
    
       0 File(s),         0 bytes total
       1 Dir(s),   15207392K bytes free
    All tests have PASSED
    0:>cd test
    cd: 0:/test
    All tests have PASSED
    0:>ls
    D-HS- 2019/08/21 15:43         0  System Volume Information
    
       0 File(s),         0 bytes total
       1 Dir(s),   15207392K bytes free
    All tests have PASSED
    0:>

    MMCCTL configured for 1-bit bus width:

  • Hi Sahin

    got it it must have been the clock rate. I had seen other code with 1 it bus using slower clock rates

    Thank you very much

    developerR