imx50 ecspi ss_ctl control

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx50 ecspi ss_ctl control

Jump to solution
1,031 Views
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?

Labels (3)
0 Kudos
1 Solution
785 Views
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.

View solution in original post

0 Kudos
2 Replies
785 Views
YixingKong
Senior Contributor IV

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

Thanks,

Yixing

786 Views
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 Kudos