MPC5777C DSPI Continuous chip select

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

MPC5777C DSPI Continuous chip select

ソリューションへジャンプ
3,858件の閲覧回数
prathapvc
Contributor III

We have configured DSPI_B to communicate with EEPROM as per the following code

 

void DSPI_B_Init(void)

{
DSPI_B.MCR.R = 0xC0010001;

     
DSPI_B_CTAR0 = 0x78011004;

       
DSPI_B.MCR.B.HALT = 0x1;


}

 

void WriteToEEPROM(void)

{   

  uint32_t i = 0,Iter = 0,uMastereData = 0,uLastWord = 0;

   
   DSPI_B.MCR.B.HALT = 0x1;

   uMastereData = (0x80010000 | 0x1400);
 
  DSPI_B.PUSHR.PUSHR.R = uMastereData;

   
   uMastereData = (0x80010000 | 0xA5A5);
   DSPI_B.PUSHR.PUSHR.R = uMastereData;

    DSPI_B.MCR.B.HALT = 0x0;
   
while((DSPI_B.SR.B.TCF == 0))//Wait for Tx complete
{}


}

We have set the CONT(bit 0) to 1 in DSPI_B.PUSHR to keep the PCS signal asserted between transfers but we have observed that PCS is asserted only for 3.20 microseconds
and de-asserted while data transfer is in progress. Please find the attached snapshot

ラベル(1)
0 件の賞賛
返信
1 解決策
3,829件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Prathap,

PCS field in PUSHR register only says which chip select will be used for transfer.

If you want to select low or high inactive state, see PCSIS field in MCR register.

Regards,

Lukas

 

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
3,845件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

I can see that you use chip select 0 which is configured as active low (inactive state is high).

That means the 3.2us pulse is inactive state. Then the chip select is asserted and data are shifted out as expected. You configured MSB first, so the waveform corresponds to value 0x1400.

I can see nothing wrong here.

Regards,

Lukas

 

0 件の賞賛
返信
3,840件の閲覧回数
prathapvc
Contributor III

hi,

Thank you for your response. So whether PCS bits in DSPI_PUSHR to be set to 0 to configure chip select 0 as active high (inactive state is Low )

 

Regards,

Prathap V C

0 件の賞賛
返信
3,830件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Prathap,

PCS field in PUSHR register only says which chip select will be used for transfer.

If you want to select low or high inactive state, see PCSIS field in MCR register.

Regards,

Lukas

 

0 件の賞賛
返信