Hello, we have an application where we have a trigger, which triggers an ADC sampling command which samples multiple channels and creates 6 FIFO entries in total.
The trigger works and we end up with 6 entries in the FIFO, but the way we detect that the operation has finished doesn't behave as we expected. There is a TSTAT register (trigger status register) which has flags for each trigger to tell if a trigger has completed. When a trigger is the corresponding flag becomes 1. But when we check the corresponding flag in a while loop like below:
while (!(LPADC_GetTriggerStatusFlags(ADC0)& (1 << 16)));
This loop never exits (we are using trigger 0 by the way). In fact, the whole register's value always stays 0.
So, we ended up checking until there are available entries in the FIFO in a while loop, and that works.
My question is why does the while loop above does not work? I tried it with the lpadc_polling example that comes with the example as well, and the loop does not exit there either. TSTAT register's value always stays as 0, although ADC values become available in the FIFO.