Hello,
I'm stuck on an issue involving the I2C controller or at least I think thats the culprit. I have a decently complex embedded system using the TM4C123GE6PMI DMA'ing data out of two SPI ports into memory which I then download to a computer to view/check the integrity of. Initially it looks like this is working great. I can run this for millions of cycles downloading >10MB of data and everything checks out ok. I verify this by pushing a counter to memory instead of ADC values.
The problem I 'm having is I need to add a I2C link to send out some control bytes to something else. When I add this instruction:
SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C1);
Just enabling I2C1 causes immediate data integrity problems where I'm dropping substantial numbers of bytes. I'm DMA'ing buffers out of two separate SPI ports to memeory when the buffers fill up from the ADC. This works really well until I enable the I2C1 peripheral. I am 100% confident that PA6 and PA7 are unused as well as I've planned on dedicating them to I2C. I've tested this on a Tiva launchpad with these instructions to configure it as a master:
SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C1); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); GPIOPinTypeI2C(GPIO_PORTA_BASE, GPIO_PIN_7); GPIOPinTypeI2CSCL(GPIO_PORTA_BASE, GPIO_PIN_6); GPIOPinConfigure(GPIO_PA6_I2C1SCL); GPIOPinConfigure(GPIO_PA7_I2C1SDA); I2CMasterInitExpClk(I2C1_BASE, SysCtlClockGet(), false);
and I can communicate fine to my target chips. Applying this to my other project I intended to use this code on seems to screw it up. Even just the
SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C1);
Being compiled in the project causes this problem. I'm really stuck right now so I wanted to throw this up to see if anyone had any ideas regarding the problem or troubleshooting it.
Effectively I configure the system and then kick off the sampling, pushing the bufferst memory via dma as fast as I can (the timing here is very tight), but I don't know how configuring a peripheral could affect the performance of these other peripherals.