Hello,
I am trying to write a program based around the Kentec EB-LM4F120-L35. Basically the program grabs data over CAN and SPI and then updates either updates the screen based on the received values and/or write data back out over CAN.
Right now I cannot get my SSI peripheral to work after I call some of the Kentec320x240x16_ssd2119_8bit.c functions for the touchscreen. Although I am still not sure what is going on, I noticed that when the function "Kentec320x240x16_SSD2119RectFill()" gets called I get some random data popping up on the pins I have dedicated to SSI (PD0-CLK, PD1-FSS, PD2-RX, PD3-TX). I have retested the code without making any GRLIB or Kentec320x240x16_ssd2119_8bit.c calls and SSI functions exactly as expected.
I have used a logic analyzer to track down one of the many places random data is popping up on PD1 (which is FSS) and it makes no sense to me why this is happening. Here are the line of code causing the spurious data to pop up:
HWREG(LCD_CS_BASE + GPIO_O_DATA + (LCD_CS_PIN << 2)) = 0;
And here are the definitions referenced in the line of code:
#define LCD_CS_BASE GPIO_PORTA_BASE
#define GPIO_O_DATA 0x00000000 // GPIO Data
#define LCD_CS_PIN GPIO_PIN_7
#define GPIO_PIN_7 0x00000080 // GPIO pin 7
This is happening with other similar HWREG calls too. I have also confirmed that all the applicable registers are reading as they should (no writes to GPIO Port D or SSI1).
Based on the provided code snippet and short summary can anyone give me some guidance on what to investigate next? My only guess is that the code snippet above is somehow writing data to incorrect registers, but then again the registers I have suspected are not showing anything wrong. I have also attached my logic analyzer trace.
Any help is appreciated!