Hello,
I am unable to get more than one character at a time in slave mode. Here is the output of the M3 SSI external loopback example. The first character is correctly read from the peripheral but the rest of the data is lost... Clearly, since the first character is correct then the hardware setup is good!
- - - - -
SSI ->
Mode: SPI
Data: 8-bit
Sent:
'M' '3' 'S' 'P' 'I' 'A' 'B' 'C'
Received:
'M' '' '°' '' 'ý' ' ' ' ' ' '
Error: Data does not exactly match.
Check that the SPI signals are connected.
- - - - -
I am getting the same result in my code, only the first character is received. Then the peripheral must be disabled then enabled to receive another character.
Below is the read routine used when in slave mode, as it should work.
while(SSIDataGetNonBlocking(SSI1_BASE, &ssiReadBuff))
{
uartWriteBuff = 0x00FF & ssiReadBuff;
UARTCharPut(UART0_BASE, uartWriteBuff);
}
This is the hack I had to do to get the peripheral to accept another character. Mind you it will only get the first character of a transmission.
while(SSIDataGetNonBlocking(SSI1_BASE, &ssiReadBuff))
{
uartWriteBuff = 0x00FF & ssiReadBuff;
UARTCharPut(UART0_BASE, uartWriteBuff);
SSIDisable(SSI1_BASE);
SSIEnable(SSI1_BASE);
}
Here is what I had to do for the transmitting (master mode) device in order to get all the data I send.
while(UARTCharsAvail(UART0_BASE))
{
SSIDataPut(SSI1_BASE, UARTCharGet(UART0_BASE));
for (i = 0; i "lessthan" 500000; i++) ;
}
I need a way to not have to reset the peripheral every character. How do I fix this issue?
UPDATE: 9/17/12
The busy bit in the status register remains set after the read. The status value is 0x13 indicating busy with empty transmit FIFO...