13 Replies Latest reply on Aug 18, 2020 1:55 AM by HuEd_3452391

    CYPD3171-24LQXQ_pb: add I2C master write in soft timer callback, but occurring reboot

    HuEd_3452391

      Hello,

       

      1. In main.c

      ----

          timer_start (0, VBUS_MONITOR_TIMER_ID, VBUS_MONITOR_TIMER_PERIOD, vbus_monitor_timer_cb);

          while (1)

          {

      ...

          }

      ----

      2. soft timer callback below in main.c as well

      ----

      void vbus_monitor_timer_cb (

          uint8_t port,

          timer_id_t id)

      {

       

          (void)port;

          (void)id;

       

          I2CM_I2CMasterWriteBuf(....)

       

          timer_start (0, VBUS_MONITOR_TIMER_ID, VBUS_MONITOR_TIMER_PERIOD, vbus_monitor_timer_cb);

       

      }

      --

       

      add I2C write in soft timer callback, but occurring reboot.

      My question is can not use the I2C master write in soft timer callback?

       

      Thanks