2017-01-19 09:22 PM
I'm learing stm32 spi,
In normal way of master mode,
I have to low the slave select pin, then transmit data, then high the slave select pin
I know that I can use dma to transmit data,
but I am not sure that dma can control slave select pin or not?
Can I have anyway to to whole transmit data(including control slave select pin) using all hardware?
#dma #stm32 #spi2017-01-19 11:56 PM
For Master SPI mode, NSS can be done by SW GPIO, then DMA (TX to send data and generate clocks, RX to receive data) for 1 or multiple blocks of data. This will generate a high throughput with no delay between bytes.
2017-01-20 03:21 AM
thank you, but one thing I still not sure is that
is there any way to high NSS after dma trasmit finished
(in some situation cpu is too busy, and it's not suitable for using interrupt handler to high NSS)
2017-01-23 02:51 AM
Hello
ctc.ctc
,Enabled theNSS pulse mode (NSSP=1), this can force the NSS HW to high between data.You may refer to the SPI section in the reference manual related to your device which help you to have more clarification about SPI communication.
Regards
Imen
2017-01-25 05:44 PM
You may want to be careful when using NSS pulse mode. I had attempted this same thing but found that NSS was pulsed high between the address and data phases of read commands. This resulted in the slave device being de-selected and therefore not responding to the read because it's address state machine had been reset.