MC56F84786 SPI CS Pin Timing Configuration

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

MC56F84786 SPI CS Pin Timing Configuration

跳至解决方案
1,024 次查看
20Sidar04
Contributor III

Dear Mr. and Mrs.,

I couldnt find any configuration for timing CS pin like configuration of SPC series PowerPC controller on CodeWarrior. I need this because When I set CS pin end of sending dummy data, Pin is getting high during data send. Due to this reason, I faced with problem which getting data from SPI line. Should I solve this problem by setting CS pin after getting data. Is there any register for timing of CS pin. Thanks in advance for precious supports.

Regards.

Sidar.

0 项奖励
回复
1 解答
998 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

when you configure the SPI in master mode, the /CS signal can be driven automatically or drive as a Gpio pin.

If you want to drive /CS automatically when the SPI transfer data, pls configure the register.

xiangjun_rong_0-1699413145600.png

 

You should configure SSB_DDR=1, SSB_AUTO=1, SSB_ODM=0, SSB_STRB=1 if you want the SPI master to drive the SS automatically.

Pls have a try

BR

XiangJun Rong

在原帖中查看解决方案

0 项奖励
回复
4 回复数
999 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

when you configure the SPI in master mode, the /CS signal can be driven automatically or drive as a Gpio pin.

If you want to drive /CS automatically when the SPI transfer data, pls configure the register.

xiangjun_rong_0-1699413145600.png

 

You should configure SSB_DDR=1, SSB_AUTO=1, SSB_ODM=0, SSB_STRB=1 if you want the SPI master to drive the SS automatically.

Pls have a try

BR

XiangJun Rong

0 项奖励
回复
983 次查看
20Sidar04
Contributor III

Dear @xiangjun_rong 

After configuring Microcontroller as following your decription, The CS pin is pulled high after each byte. But I want the CS pin keep low until the last byte transfer is completed. How can i solve this problem?

Regards.

Sidar

0 项奖励
回复
982 次查看
20Sidar04
Contributor III

Following picture is describe my problem. Other microcontroller IDE has configuration to keep cs low pin until last data byte transfer. Such as S32  PCS continuous checkbox.

0 项奖励
回复
963 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I have checked the spi timing in the attached picture, obviously, the waveform is correct, the /CS low interval covers the data transfer.

If you do want to clear the /CS until all data are transferred, you can use any GPIO pin or just configure the /CS pin of master spi as GPIO output mode, not all the peripherals pins are multiplexed with GPIO. First of all, just configure the /CS pin as GPIO output mode, before you transfer any data, clear the GPIO, after the transfer is over, set the GPIO pin.

Hope it can help you

BR

XiangJun Rong

0 项奖励
回复