Part Number: AM5728
Hi all,
In my system I have Linux running on MPU (both cores) and I want to write DSP application which talks to I2C gpio expander. I have tried example shipped with CLS but it seems that it does not work. In order to test PINMUX and hardware I used i2ctools package to test if I can communicate with expander on Linux - everything was working ok, I was able to read/write registers with 400ksps rate. Then on the Linux side I have modified dts to disable use of i2c4 bus and modified CSL example with correct base address of I2C4. I compiled bear-metal project with linker file used for CSL examples. Prorgram was loaded on DSP1 with JTAG (xds100v2).
When I try to run the examplel code it hungs in SetupI2C() function on:
void SetupI2C(void)
{
/* Do a software reset */
I2CSoftReset(gI2cAddr);
/* Enable i2c module */
I2CMasterEnable(gI2cAddr);
while (!I2CSystemStatusGet(gI2cAddr)) ;
/* Put i2c in reset/disabled state */
I2CMasterDisable(gI2cAddr);
I have checked if the previous function I2CMasterEnable() enables i2c module, but it seems it does not. When I check memory at offset 0xa4 I have only zeros.
I have following questions:
1. What I have to do in order to have access to I2C4 memory (0x4807_A000) from DSP1 core. Shall I configure MMU/Firewall ? Can you provide detailed steps ?
2. If I2C4 code will work (in pooling mode) can I assume that the same code will work on M4 core ?
3. In my application I want to use GPIO3 interrupt (SYS/BIOS) . Do I need to configure IRQ crossbar ? Is it possible to have some minimal code for am5728 ?
Regards Grzegorz