imx50 ecspi ss_ctl control

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

imx50 ecspi ss_ctl control

ソリューションへジャンプ
1,838件の閲覧回数
michaelcarrier
Contributor III

I have an IMX50 EVK that I am trying to connect to a spi device. Our implementation requires the ss_ctl line to be active low during the entire 2 bytes transmit transaction. I have configured ecspi2 to be the master device and I am using the provided mxc_spi.c delivered with the MCIMX50EVK dev D board. I configured spidev2.0 to be my particular user space spi driver. I am attempting to send 2 bytes (0x5511) out the escpi2 device. Using an oscilloscope I can see the 2 data bytes and the associated clock. The slave select line goes low during the time each byte is transmitted. However, in between each byte the slave select line transitions high. I need this to remain low until the 2 bytes have been transmitted.

From what I am reading setting bit 8 in ECSPIx_CONFIGREG and configuring ECSPIx_PERIODREG to 0 should produce a slave select waveform such that the slave select line remains low during idle byte periods. What am I missing here?

ラベル(3)
0 件の賞賛
返信
1 解決策
1,592件の閲覧回数
PeterChan
NXP Employee
NXP Employee

From i.MX50 reference manual 22.3.5.1.3, ECSPIx_CONFIGREG bit 8 should be clear (SS_CTL[0] is clear) for no SS negate between the SPI bursts. ECSPIx_CONREG:SMC must be 1 when using ECSPIx_CONFIGREG:SS_CTL to control the SS waveform.

Alternatively, you can set the ECSPIx_CONREG:BURST LENGTH=0x1F for 16 bit SPI burst and write 16-bit data to lower nibble of ECSPIx_TXDATA.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,592件の閲覧回数
YixingKong
Senior Contributor IV

Michael, if Peter's answer is good, please click Correct Answer.

Thanks,

Yixing

1,593件の閲覧回数
PeterChan
NXP Employee
NXP Employee

From i.MX50 reference manual 22.3.5.1.3, ECSPIx_CONFIGREG bit 8 should be clear (SS_CTL[0] is clear) for no SS negate between the SPI bursts. ECSPIx_CONREG:SMC must be 1 when using ECSPIx_CONFIGREG:SS_CTL to control the SS waveform.

Alternatively, you can set the ECSPIx_CONREG:BURST LENGTH=0x1F for 16 bit SPI burst and write 16-bit data to lower nibble of ECSPIx_TXDATA.

0 件の賞賛
返信