How to configure data transfer mode of uSDHC on mpc5748g?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to configure data transfer mode of uSDHC on mpc5748g?

801件の閲覧回数
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 返答(返信)

779件の閲覧回数
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 件の賞賛
返信

774件の閲覧回数
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 件の賞賛
返信

751件の閲覧回数
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 件の賞賛
返信

749件の閲覧回数
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 件の賞賛
返信