Data logging on SD card using S32K144

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

Data logging on SD card using S32K144

2,032 Views
Mrudula
Contributor I

Hello @mariuslucianand @kerryzhou ,

I want to use a micro SD card for data logging with the S32k144 controller. I read your posts on https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/SD-card-logging-for-S32K144-using-Simulink... 
 
I have the fatfs files but I need help with the SD card communication using spi. I checked out Kerry's posts too:
 
It would be of great help if the header files were available because the following function and Macros have not been defined in the code:
  1. System_init();                (in main.c)
  2. spiInit();                         (in main.c)
  3. MMCCSD_CID();           (in diskio.c)
  4. MMC_CS_SET();           (in MMCCS())
  5. MMC_CS_SET();           (in MMCCS())
Macros in the SD card code:
  1. SD_TYPE_V2HC
  2. SD_Type
  3. SPI_S_SPTEF_MASK
  4. SPI_S_SPRF_MASK
  5. SPI0_BASE_PTR->BR
 
Regards,
Mrudula
0 Kudos
8 Replies

927 Views
Arjun47
Contributor I

hi Mrudula ,

 

My name is Arjun,

Can u plz help me for the same , if u got the SD card driver.

I am using free RTOS withs32k146.

Thanks in Advance.

0 Kudos

907 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Please create your own question post, then our Auto MCU engineer will help you, thanks.

 

Best Regards,

Kerry

0 Kudos

775 Views
Arjun47
Contributor I

Hi Kerryzou

Please help me to develop SDMMC card driver on S32k146, i am using free RTOS on s32 design studio

 

Thanks in Advance

 

Arjun

0 Kudos

772 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Arjun47 ,

  Please create a new question post about it, then our auto mcu engineer will help you.

  I mainly support the I.MX RT product, thanks.

Best Regards,

Kerry

0 Kudos

746 Views
Arjun47
Contributor I

ok

 

0 Kudos

2,021 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Mrudula,

  S32K144 should have the related SD card driver SDK, you don't need to use my post code, that is based on the baremetal.

   You can check the S32K144 SDK code at first.

Best Regards,

Kerry

0 Kudos

2,011 Views
Mrudula
Contributor I

Hi @kerryzhou ,

I downloaded the sdk. I found the lpspi drivers however I could not find any sd card driver for S32K144. Examples are also not available for sd card.

Can you suggest a way to move forward? 

 

Regards,

Mrudula

0 Kudos

1,987 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Mrudula

   Now, I mainly support the RT and kinetis product, not the S32K144, so I also don't have your chip related driver.

   But if you want to refer to the Kinetis SPI SD card driver, I attach it for your reference.

  Wish it helps you!

   But you need to modify the related SPI driver to your own chip driver, you need to make sure the chip SPI operation is correct, then add the SD card init, write, read etc, then add the fatfs.

 

Best Regards,

Kerry

0 Kudos