I'm trying to use SPI communication using C2000, how to control the slave select pin ,what settings should be selected in hardware implementation? ?

24 visualizaciones (últimos 30 días)
1) there are 3 SPI related blocks in library for C2000 ,SPI master transfer, SPI transmit & SPI receive . i want to communicate over one SPI channel only, so
a) which of these three blocks should i use for this?
b) there are two options to select slave select pin( provided by SPI peripheral & explicit GPIO pin select) , i tried using both options but i m getting different behavior on CS pin, in first case(spi peripheral) pin remains high in idle state ,at the start of transmission,it gets low but as soon as transmission is done it gets pulled up again.since i m expecting reply from slave also just after transmission , what should be the behavior of the CS pin , if it is required to remain low ,how do i control this pin, so that it remains low till full reply from slave is received?
when selecting second option(gpio pin), it gets low at start of transmission,and remains low till i send next command. is this the expected behavior or i m missng some setting for this PIN?
2)If using two SPI channels, what settings should be there for SPI blocks(in hardware implementation or in the specific blocks).
3)when communicating between two channels(using MBD) in same TI-launchpad, i m just sending data from one channel(MASTER)and trying to receive on second channel(SLAVE) through SPI, i m using SPI transmit block for first channel(MASTER) and SPI receive block for the second channel(SLAVE) , why i m getting data on MISO pin if i m not sending anything from SLAVE.?
4)please share some example model(MBD), where communication over SPI one channel is done , using two different dimension commands sending back to back in an interval of 1ms.

Respuestas (1)

Aditya Padmanabha
Aditya Padmanabha el 22 de Sept. de 2021

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by