MPC5777C DSPI Continuous chip select

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

MPC5777C DSPI Continuous chip select

跳至解决方案
3,877 次查看
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,848 次查看
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,864 次查看
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,859 次查看
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,849 次查看
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 项奖励
回复