3 Replies Latest reply on Sep 1, 2017 8:01 PM by Michael.Hartmann_2710316

    I2C Master ending up in ASSERT in IRQ routine

      Trying to get an I2C Master working in the Dev Kit but running into issues.

       

      When trying to use the I2C Master I end up in an ASSERT in the IRQ routine if the module is set to "Fixed Function".

      Seems I end up in a condition that should never happen (No ACK, no NACK).

       

                     if(I2C_CHECK_ADDR_ACK(tmpCsr))

                      {

      ...

                      }

                      /* Address is NACKed */

                      else if(I2C_CHECK_ADDR_NAK(tmpCsr))

                      {

      ...

                      }

                      else

                      {

                          /* Address phase is not set for some reason: error */

                          #if(I2C_TIMEOUT_ENABLED)

                              /* Exit interrupt to take chance for timeout timer to handle this case */

                              I2C_DisableInt();

                              I2C_ClearPendingInt();

                          #else

                              /* Block execution flow: unexpected condition */

                              CYASSERT(0u != 0u);

                          #endif /* (I2C_TIMEOUT_ENABLED) */

                      }

       

      On the pins I see 8 CLK's but never anything on the data line.

       

      If I switch the module to UDB I don't end up in the assert but an endless loop in main.c waiting for the Transfer to complete.

       

      There's nothing else in this project just the I2C master and a little bit of code to push out data.

      Using Creator 4.1. (Sample Project Attached.)

      Pull-Ups are attached, same behavior with I2C slave attached or not....

       

      I would expect to see the device address to be pushed out in any case so this is very strange.

      Anybody got any ideas?

       

      Thanks,

       

      Michael