How to configure data transfer mode of uSDHC on mpc5748g?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to configure data transfer mode of uSDHC on mpc5748g?

800 次查看
shingozhou
Contributor III

Hi, 

  Data transfer modes are described in the chapter 49.2.1.2.1 of the MPC5748G Reference Manual. As mentioned there, how to configure one of these modes, such as SD 4-bit? There is not related function to configure it directly.

 

  Precondition: MPC5748G, S32DS for PA2.1, SDK PA RTM v3.0.0, freeRTOS.

 

BR,shingo

0 项奖励
回复
4 回复数

778 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

there's function uSDHC_DRV_SetDataBusWidth() which configures DTW bit field in uSDHC_PROT_CTRL register.

Regards,

Lukas

0 项奖励
回复

773 次查看
shingozhou
Contributor III

Hi, Lukas:

  Funtion uSDHC_DRV_SetDataBusWidth() just sets the buswidth,  cannot judge the data transfer mode.

take 4-bit for example, after using function uSDHC_DRV_SetDataBusWidth(INST_USDHC1, uSDHC_DATA_BUS_WIDTH_4BIT), which the data transfer mode of the uSDHC works on? SD 4-bit or MMC 4-bit ?

BR,shingo

0 项奖励
回复

750 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

it is up to the driver to recognize which card is connected. It's not necessary to do this manually by user.

Regards,

Lukas

0 项奖励
回复

748 次查看
shingozhou
Contributor III

Hi, Lukas:

  Thank you for your advice, but I have another question as follows: 

  If the MCU is connected to an external SD I/O card instead of an SD card or MMC card, in order to initialize the uSDHC module, which of the following two options should I choose?

 1. use the function uSDHC_Init() defined in the file "usdhc_impl.c".

 2. directly use a few simple library fucntions defined in the file "usdhc_driver.h", such as uSDHC_DRV_Init(), uSDHC_DRV_InstallCallback(), uSDHC_DRV_SetBusClock(), uSDHC_DRV_SetDataBusWidth().

 PS: precontion:S32_SDK_S32PA_RTM_3.0.0.

BR, shingo

0 项奖励
回复