LPC 845 | Pause SPI SLAVE while using DMA transfer

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

LPC 845 | Pause SPI SLAVE while using DMA transfer

1,181 次查看
NXP_USER_11
Contributor II

Hi all,

I am interested in finding a way to pause the SPI SLAVE from sending data even if the CSSEL Line is on.

I am using a DMA SPI connection and the SPI SLAVE is configured correctly. Is there a way to change a transmit register to avoid sending?


Disabling the SPI in the configuration register would reset the whole setup.

Dirty fixes like changing / inverting the Polarity should be avoided.

My biggest hope was changing the TXSSEL0_N and following bits in the TXDATCTL register, however it did not work out.

Can anyone help me there?

 

Furthermore, while debugging I found, that the SPI STATUS register gave me a 270 and 271, which makes me curious, because according to the Datasheet/Manual, thats an overrun and I would have thought, that I would receive an error then.

标签 (1)
标记 (4)
0 项奖励
回复
4 回复数

1,167 次查看
NXP_USER_11
Contributor II

Hi XiangJun Rong

Thank you for your fast answer!

Thats exactly what I did, however I need to setup the complete SPI Slave configuration afterwards again. I tought I might be able to decrease this overhead.

Option 2 sounds very interesting, that would mean, that I can still listen to the receive data line and the transmit line would be routed to an abandonded pin.

To ignore the incoming receive data, there is an extra register in TXDATCTL Bit 22.

NXP_USER_11_0-1627649009416.png

Thanks for sharing your ideas, I have some new stuff to try

Bests,
Konrad 

0 项奖励
回复

1,156 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Konrad,

Regarding you question of slave spi, I would like to know if you want to pause the slave SPI in other words, you want to pause both the receiver and transmitter? or you just want to pause the transmitter but the receiver works normally.

For the SPI_TXDATCTL[RXIGNORE], if the bit is set, not matter whether the spi module is in master or slave mode, the receiver is ignored, but the transmitter works normally.

BR

XiangJun Rong

0 项奖励
回复

1,152 次查看
NXP_USER_11
Contributor II

Hi XiangJun Rong,

My intention is to avoid transmitting data from the slave to the master, unless the slave decides to send it and enables the transmit line. This could be done by disabling the whole protocol, with the disadvanatage to not be able to receive data anymore, or to change the MISO line to an other pin, if this wont reset the SPI in each instance of changing the Line.

So, a nice not demanding way of pausing the transmitter would be excellent to have.

Bests and thanks a lot,

0 项奖励
回复

1,173 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I see that you use SPI of LPC845 as slave mode, you would like to pause the SPI, I think you can consider the following solution:

1)Clear Enable bit in SPI CFG reg

xiangjun_rong_0-1627614668014.png

 

2)disable SPI_SCK signal, you use SWM to route the SPI_SCK signal to a pin which the master SPI drive. But you can route the SPI_SCK to an unused pin, which is not driven, so the SPI can not receive anything.

Hope it can help you

BR

XiangJun Rong

 

0 项奖励
回复