You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* Reset dtat FIFO threshold for normal amp */
if(AppCHRONOAMPCfg.EndSeq)
{
AD5940_FIFOCtrlS(FIFOSRC_SINC3, bFALSE); /* Disable FIFO firstly */
fifo_cfg.FIFOEn = bTRUE;
fifo_cfg.FIFOMode = FIFOMODE_FIFO;
fifo_cfg.FIFOSize = FIFOSIZE_2KB; /* 4kB for FIFO, The reset 2kB for sequencer */
fifo_cfg.FIFOSrc = FIFOSRC_SINC2NOTCH;
fifo_cfg.FIFOThresh = AppCHRONOAMPCfg.FifoThresh; /* DFT result. One pair for RCAL, another for Rz. One DFT result have real part and imaginary part */
AD5940_FIFOCfg(&fifo_cfg);
seq_cfg.SeqEnable = bTRUE;
AD5940_SEQCfg(&seq_cfg); /* Enable sequencer, and wait for trigger */
AD5940_ClrMCUIntFlag(); /* Clear interrupt flag generated before */
}
FIFO is set to be 2KB while the comments says 4KB should be set. However right after ISR function AppCHRONOAMPISR() calls AppCHRONOAMPRegModify(), AppCHRONOAMPCtrl(CHRONOAMPCTRL_START, 0); is called, which sets sequencer memory size to 2KB.
case CHRONOAMPCTRL_START:
{
...
/* Configure FIFO and Sequencer for normal Amperometric Measurement */
AD5940_FIFOThrshSet(AppCHRONOAMPCfg.FifoThresh);
seq_cfg.SeqMemSize = SEQMEMSIZE_2KB; /* 2kB SRAM is used for sequencer, others for data FIFO */ // This line!
seq_cfg.SeqBreakEn = bFALSE;
seq_cfg.SeqIgnoreEn = bFALSE;
seq_cfg.SeqCntCRCClr = bTRUE;
seq_cfg.SeqEnable = bTRUE;
seq_cfg.SeqWrTimer = 0;
AD5940_SEQCfg(&seq_cfg);
/* Configure Wakeup Timer*/
...
}
This breaks the FIFO and no FIFO threshold interrupts are generated. Removing AppCHRONOAMPRegModify() in AppCHRONOAMPISR() resolves this issue.
Also, the FIFO size is already 4kb as set by the PULSETEST case in AppCHRONOAMPCtrl(), I don't see the point in manually setting it to 4kb again after measuring the transient.
The text was updated successfully, but these errors were encountered:
in function
AppCHRONOAMPRegModify()
:FIFO is set to be 2KB while the comments says 4KB should be set. However right after ISR function
AppCHRONOAMPISR()
callsAppCHRONOAMPRegModify()
,AppCHRONOAMPCtrl(CHRONOAMPCTRL_START, 0);
is called, which sets sequencer memory size to 2KB.This breaks the FIFO and no FIFO threshold interrupts are generated. Removing
AppCHRONOAMPRegModify()
inAppCHRONOAMPISR()
resolves this issue.Also, the FIFO size is already 4kb as set by the PULSETEST case in
AppCHRONOAMPCtrl()
, I don't see the point in manually setting it to 4kb again after measuring the transient.The text was updated successfully, but these errors were encountered: