Tool/software: Code Composer Studio
Hello,
Let me start off by saying I am a complete newbie with the TM4C123G Launchpad and still a beginner with C coding. I am a college student and just finished a course using PIC micro controllers. I am using the TM4C123G (programming in CCS) for my senior project which feels like an enormous leap from using MPLAB and the PICs. I have read everything on SSI in the datasheet and deciphered what I could from the SSI.C functions from the TIVA C Library, but I do have some questions that I couldn't find the answers to:
1. Is the Freescale SPI Format (clock, SSInFss, Rx, Tx) automatically performed by the SSI module when I write/read data to/from the SSI data register? For PIC, I had to manually set chip select and transmit a dummy byte to keep the clock going when reading data. From what I have read in the TIVA datasheet, it seems like the TM4C123G does all of that for me.
2. For my project, I need to receive a lot of bytes of continuous data. probably up to 64 bytes, which is a lot for me since the most I have transmitted/read continuously in my PIC course is roughly 2-3 bytes. My understanding of SSI is that I just need to send data which includes the address, R/W, and command to read from a slave device, then read the received data from the data register. Assuming that is correct, if I need to receive continuous data, do I just keep reading from data register back to back?
For example, in my project I need to talk with a USB host controller (VDIP1) using SPI. I have to send 3 separate transmissions to tell it to send back information like its firmware version. Then it sends me a big stream of data. (I consider one sentence of data a lot at my current skill level). How do I read continuously? Can I just use the SSIDataGet function on loop or back to back until the VDIP1 is done sending? for example, could the following code work? (Assume SSI module is configured correctly and enabled. Ignore syntax issues as this is just a hypothetical section of code) I just want to know if I am on the right track.
//these are just arbitrary values. Pretend these are the three values I need to send to the host controller to read data.
SSIDataPut(SSI0_BASE, 0x9F);
SSIDataPut(SSI0_BASE, 0x9F);
SSIDataPut(SSI0_BASE, 0x9F);
//I'll figure out the while loop later. I haven't thought about how I would check to see if I'm done receiving data yet.
while(a<b)
{
SSIDataGet(SSI0_BASE, *pui32Data);
*pui32Data ++;
a++;
}
3. If I did something like the above, would I be able to read a continuous stream of data? Does the SSI module automatically pulse the SSInFss. Will the clock just keep going if I do this?
I appreciate any responses that I get. However, I do ask that you dumb it down as much as possible for me. Still learning a lot of the technical language surrounding micro controllers and C code.