lpc 1769 EA base board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lpc 1769 EA base board

518 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gowtham on Mon Jun 15 22:28:39 MST 2015
Hi all... i am using LPCxpresso EA baseboard revB ....I need sample codes for writing in sd card ...can any one help??
0 Kudos
8 Replies

481 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cfb on Thu Jun 18 15:29:36 MST 2015
Login to the EA support website and download the latest code lpc176x_xpr_bb_140609.zip from there (NOTE: these are copyright files. You should not be publishing copies of these on forums like this without permission from EA).

Also make sure that you have all the correct SPI-related jumpers set as described in the EA Baseboard Users Guide (e.g. section 4.3.3).
0 Kudos

481 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gowtham on Wed Jun 17 04:03:28 MST 2015
I used a plain(2 GB "non HC") micro SD card with an adapter.. In that case also, it didn't work.
0 Kudos

481 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Wed Jun 17 03:53:48 MST 2015
I am pretty sure that SDHC is not supported. Try a plain SD card first.
0 Kudos

481 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gowtham on Wed Jun 17 03:50:25 MST 2015
I am using SDHC card... According to that code, Uart will transmit particular string in both cases ie., presence and absence of the sd card... but nothing is getting transmitted...

stat = disk_initialize(0);
    if (stat & STA_NOINIT) {
    UART_SendString(UART_DEV,(uint8_t*)"MMC: not initialized\r\n");
      uart2_sendString((uint8_t*)"\r\n no sd initialised \r\n");
      oled_putString(1,1,  (uint8_t*)" HELLO ", OLED_COLOR_BLACK, OLED_COLOR_WHITE);

    }

    if (stat & STA_NODISK) {
    UART_SendString(UART_DEV,(uint8_t*)"MMC: No Disk\r\n");
      uart2_sendString((uint8_t*)"\r\n no sdcard\r\n");
      oled_putString(1,1,  (uint8_t*)" HELLO ", OLED_COLOR_BLACK, OLED_COLOR_WHITE);

    }

    if (stat != 0) {
        return 1;
    }

    UART_SendString(UART_DEV,(uint8_t*)"MMC: Initialized\r\n");

    if (disk_ioctl(0, GET_SECTOR_COUNT, &p2) == RES_OK) {
        i = sprintf((char*)buf, "Drive size: %d \r\n", p2);
        UART_Send(UART_DEV, buf, i, BLOCKING);
    }

    if (disk_ioctl(0, GET_SECTOR_SIZE, &w1) == RES_OK) {
        i = sprintf((char*)buf, "Sector size: %d \r\n", w1);
        UART_Send(UART_DEV, buf, i, BLOCKING);
    }

    if (disk_ioctl(0, GET_BLOCK_SIZE, &p2) == RES_OK) {
        i = sprintf((char*)buf, "Erase block size: %d \r\n", p2);
        UART_Send(UART_DEV, buf, i, BLOCKING);
    }

    if (disk_ioctl(0, MMC_GET_TYPE, &b1) == RES_OK) {
        i = sprintf((char*)buf, "Card type: %d \r\n", b1);
        UART_Send(UART_DEV, buf, i, BLOCKING);
    }

    res = f_mount(0, &Fatfs[0]);
    if (res != FR_OK) {
        i = sprintf((char*)buf, "Failed to mount 0: %d \r\n", res);
        UART_Send(UART_DEV, buf, i, BLOCKING);
        return 1;
    }

    res = f_opendir(&dir, "/");
    if (res) {
        i = sprintf((char*)buf, "Failed to open /: %d \r\n", res);
        UART_Send(UART_DEV, buf, i, BLOCKING);
        return 1;
    }

    for(;;) {
        res = f_readdir(&dir, &Finfo);
        if ((res != FR_OK) || !Finfo.fname[0]) break;

        UART_SendString(UART_DEV,(uint8_t*)&(Finfo.fname[0]));
        UART_SendString(UART_DEV,(uint8_t*)"\r\n");

    }


None of the condition is been true...Am i do it wrong?? plz let me know what should i do??
0 Kudos

481 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Wed Jun 17 01:07:25 MST 2015
What is not working? What have you tried? What type of SD card (HC?)
0 Kudos

481 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gowtham on Tue Jun 16 21:29:46 MST 2015
Hi,
For the lpc1769 embedded artists base board, i have got the sample codes from the forum...All the peripharal codes are working except Sd card  (mmc_fat) ..I have attached the zipped file... Can anyone help?
0 Kudos

481 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Tue Jun 16 10:36:16 MST 2015
Hi,
below link may be helpful
http://www.lpcware.com/content/nxpfile/an10916-fat-library-efsl-and-fatfs-port-nxp-lpc1700
0 Kudos

481 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Tue Jun 16 05:29:51 MST 2015
Yes. Search these forums for the LPCOpen examples for the device that you are using.
0 Kudos