Forum Discussion

CAlex's avatar
CAlex
Icon for Contributor rankContributor
2 years ago

CycloneVsoc baremetal with SDMMC issue

Hi

Im using micro sdcard to receive the data from the HPS.

What I want to achieve is that store some data when HPS is running, after it shut down, I can take out the data and analysis the data.

My operation flow looks like this:

Clk ticking ---> buffer take the data of lastest period of time ---> STOP sig ---> Clk stop ticking ---> buffer send data to the SDcard --> take the sdcard and read the data inside form my computer

I made some test using the baremetal example form yours, the codes are shown:

hps_fifo_pop(&SERDES_Y_FIFO, data_out); // a simple circular fifo api
alt_sdmmc_write(&HPS_FIFO_CARD_INFO,0x00000000, data_out, sizeof(uint32_t));
alt_sdmmc_read(&HPS_FIFO_CARD_INFO,&data, 0x00000000, sizeof(uint32_t));
RTOS_PRINTF("data from the sdcard is %lf.",data);
RTOS_PRINTF("\n");
RTOS_PRINTF("data from the fifo is %lf.",*data_out);
The result are shown:

data from the fifo is -0.154103.
data from the sdcard is 0.000000. <=== should be the same number from the fifo
The questions are followed:
1. Does the micro sd need some file system? So that I can read form my computer?
2. Why the two data doesn't match? How can I fix it?
Thank you for your help
Alex

3 Replies

  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi


    Any update on this case?

    Have you managed to write to the sd card?


    Regards

    Jingyang, Teh


  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi


    Since there are no feedback for this thread, I shall set this thread to close pending. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.

    If you happened to close this thread you might receive a survey. If you think you would rank your support experience less than 4 out of 10, please allow me to correct it before closing or if the problem can’t be corrected, please let me know the cause so that I may improve your future service experience.


    Regards

    Jingyang, Teh