Post Go back to editing

AD5940_Amperometric example hangs when it's shutdown and restarts

On my custom board, I am seeing a system hang (interrupt does not trigger any more) when another AMP measurement is attempted following the first successful amp measurement. I modified the AD5940_Amperometric example code and was able to reproduce the same issue on my EVAL-AD5941ELCZ. I built it with KEIL uVision 5.


void AD5940_Main(void)
  uint32_t temp;
  uint32_t count;

  count = 0;

  AD5940AMPStructInit(); /* Configure your parameters in this function */
  AppAMPInit(AppBuff, APPBUFF_SIZE);    /* Initialize AMP application. Provide a buffer, which is used to store sequencer commands */
  AppAMPCtrl(AMPCTRL_START, 0);         /* Control AMP measurement to start. Second parameter has no meaning with this command. */

    /* Check if interrupt flag which will be set when interrupt occurred. */
      AD5940_ClrMCUIntFlag(); /* Clear this flag */
      temp = APPBUFF_SIZE;
      AppAMPISR(AppBuff, &temp); /* Deal with it and provide a buffer to store data we got */
      AMPShowResult((float*)AppBuff, temp); /* Show the results to UART */
    if (count == 10) {
      goto restart;

Any idea how to debug this?