Part Number: AMIC110
Tool/software: TI-RTOS
Hi Together,
I want to use the SPI in the PRU-ICSS-Profinet_Slave Example.
What I did till now is to add an Task, which initializes the SPI as following:
void spiFunction(void) {
static SPI_Handle spiHandle1 = NULL;
static SPI_Handle spiHandle2 = NULL;
static SPI_Params spiParams;
SPI_Transaction spiTransaction;
TaskP_sleep(20000);
//Board_initSPI();
UART_printf("Start SPI task\n");
SPI_Params_init(&spiParams);
spiParams.transferMode = SPI_MODE_BLOCKING;
spiParams.transferTimeout = SPI_WAIT_FOREVER;
spiParams.transferCallbackFxn = NULL;
spiParams.mode = SPI_MASTER;
spiParams.bitRate = 4000000;
spiParams.dataSize = 6;
spiHandle1 = SPI_open(0, &spiParams);
spiHandle2 = SPI_open(1, &spiParams);
uint8_t transmitBuffer[1];
transmitBuffer[0] = 0xFF;
spiTransaction.count = 1;
spiTransaction.txBuf = transmitBuffer;
spiTransaction.rxBuf = NULL;
while(1) {
TaskP_sleep(500);
SPI_transfer(spiHandle1, &spiTransaction);
SPI_transfer(spiHandle2, &spiTransaction);
UART_printf("Send spi\n");
}
}
After this, I checked the pins of the TMDXICE110-BTA board and nothing happens.
So I had a look at the schematic and figured out, that the PIN-HEADS first had to be enabled by setting pin MII2_RXD0 to low. But after one hour of searching I couldn't figure out, how to do this. First I need somehow to define which pin I want to talk to, am I right?
This should be written in an PIN-MUX file. But where to find it? The PROFINET_IRT_Slave_Datasheet says something like that:
"HW signals required to implement PROFINET IRT slave functionality is shown below, this info needs to
be used in conjunction with http://www.ti.com/tool/PINMUXTOOL"
So do I need to make my own PINMUX-File?
Or how can I talk SPI with this project?
Best Regards
Stefan