Not applicable
May 09, 2015
08:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 09, 2015
08:59 AM
Hello everybody,
I started experimenting with an I2C connection between a XMC 4500 Relax Kit (as master) and a XMC 1100 2go (as slave).
The basic code and settings are almost identical to the I2C-tutorial, except that master and slave are not on the same hardware.
It works fine if I send a few data, so the code as such and hardware-setup (pull-up resistor, etc.) is ok.
The problem is:
The master stops sending after a while. This occurs very sporadically, sometimes after 20 data packages, sometimes after 200 or more.
It doesn't depend on the data I send, because for testing they are always the same.
It seems the master get stuck in the I2C001_WriteData-function while loop:
and more speciffic, at this point the function returns false and get stuck:
I have no idea what causes this behavior nor how to prevent it.
Does anyone have an suggestion?
Greating from Munich
Sebastian
I started experimenting with an I2C connection between a XMC 4500 Relax Kit (as master) and a XMC 1100 2go (as slave).
The basic code and settings are almost identical to the I2C-tutorial, except that master and slave are not on the same hardware.
It works fine if I send a few data, so the code as such and hardware-setup (pull-up resistor, etc.) is ok.
The problem is:
The master stops sending after a while. This occurs very sporadically, sometimes after 20 data packages, sometimes after 200 or more.
It doesn't depend on the data I send, because for testing they are always the same.
It seems the master get stuck in the I2C001_WriteData-function while loop:
while( !I2C001_WriteData( &I2C001_Handle0 , &MasterTxData ) );
and more speciffic, at this point the function returns false and get stuck:
if(USIC_IsTxFIFOfull(I2CRegs))
{
Result = (bool)FALSE;
}
I have no idea what causes this behavior nor how to prevent it.
Does anyone have an suggestion?
Greating from Munich
Sebastian
1 Reply
Not applicable
May 10, 2015
10:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 10, 2015
10:54 AM
Do a polling mode, with no fifo.
Then you can monitor the Irq flags via Master & Slave Apps.
Later you can step via irq-handling mode, single transmit and receive.(Master-->Slave).
Flags must have an ACK .... to run this round.
This is the first step to debug... the Apps. on both sides.
Greetings Holger.
Then you can monitor the Irq flags via Master & Slave Apps.
Later you can step via irq-handling mode, single transmit and receive.(Master-->Slave).
Flags must have an ACK .... to run this round.
This is the first step to debug... the Apps. on both sides.
Greetings Holger.