Hello.
I'm using examples from here http://processors.wiki.ti.com/index.php/QuickStartOMAPL1x_rCSL so I assume everything is configured riight. For me it looks ok. My project is build from union of McASP example and I2C (use IOExpander) example.First example only pass through audio signal using interrupt service function. Second works like this: it waits for user to change DIP1 position. In this state it sends commends through I2C to check condition of DIP1 and didn't crash. Problem appears when I switch DIP and proogram goes to toggle LED where it also using only I2C communication. Then, audio transsmision stops. I don't have any idea why. Please help me.
I don't see any code include options so I just copy it:
static Bool wait_for_user_input (void)
{
// Read from the Port 1 Input Register
readIoExpCmd[COMMAND_BYTE] = INPUT_PORT1;
// Send Address to IO Expander
while(I2C_write(I2C_IO_EXPANDER_ADDR, readIoExpCmd, sizeof(readIoExpCmd)));
// Read from IO Expander
while(I2C_read(I2C_IO_EXPANDER_ADDR, inputRegP1, sizeof(inputRegP1)));
// Process Current DIP Switch Configuration
newInputP1 = inputRegP1[0] & userSW1;
// Test for User Input
if(prevInputP1 != newInputP1)
return FALSE;
return TRUE;
}/* wait_for_user_input */
static void toggle_user_LED (void)
{
// Write to the Port 0 Output Register
writeIoExpCmd[COMMAND_BYTE] = OUTPUT_PORT0;
dummyDelay(1000);
for(counter = 0; counter < LED_BLINK_COUNT; counter++)
{
// Turn LED1 On
writeIoExpCmd[DATA_BYTE] = LED1_ON;
while(I2C_write(I2C_IO_EXPANDER_ADDR, writeIoExpCmd, sizeof(writeIoExpCmd)));
dummyDelay(1000);
// Turn LED1 Off
writeIoExpCmd[DATA_BYTE] = LED1_OFF;
while(I2C_write(I2C_IO_EXPANDER_ADDR, writeIoExpCmd, sizeof(writeIoExpCmd)));
dummyDelay(1000);
}
}/* toggle_user_LED */