This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PGA460-Q1: Direct Data Burst Mode

Part Number: PGA460-Q1
Other Parts Discussed in Thread: PGA460,

Hello Everyone,

I am using PGA460 to detect object.

I am extracting direct data using 8Mbps USART. My record length is 4.096*1 ms i.e. 4096 byte data but I am getting only 1600 data bytes. And when I increase my record length using REC_LENGTH register, the data byte also increase in multiple of 1600 i.e. for 8.192ms record length I got 3200 data byte and so on. What is the issue here. Can anyone explain me the cause of this problem?

Thanks 

  • Hi Yash,

    The below image shows the direct data burst data format:

    The output data-stream starts with a PGA460-Q1 diagnostic data field, followed by number of data bytes and ends with a checksum field calculated on the diagnostic data byte and all data bytes. The number of data bytes depends on the number of samples extracted from the PGA460-Q1 device, which depends on the Recording Time Interval of the current command. The recording time Interval is determined by the P1_REC and P2_REC parameters in the EEPROM memory while the sampling rate of the ADC and digital signal path is 1 µs / Sample. From here it can be calculated that the number of samples is equivalent to the recording time when expressed in microseconds.  That is why you see the number of data bytes double when you double the record length from 4.096 ms to 8.192 ms.

    In both cases, I suspect that there may be gaps between some of the SPI clock cycles, which results in missing samples.  These gaps could occur if there are processing delays for sending out consecutive groups of SCLK cycles.  As an example, if you do a manual write to an 8-bit buffer in order to output eight consecutive SCLK cycles, there could be a delay from one set of 8 clock cycles to the next set of clock cycles due to the processing delay from manually writing to the buffer. 

    To help reduce the delay, you can try using a DMA (if not done so already) for sending out the consecutive SCLK cycles.  In addition, one thing that may help determine which samples you have missed is to use the sample counter, which is available when SAMPLE_SEL=1.  If SAMPLE_SEL=1, please keep in mind though that the number of ADC samples actually sent out would be half the number of ADC samples sent out when SAMPLE_SEL=0 due to each ADC sample being sent as two bytes instead of the one byte that is sent out when SAMPLE_SEL=0.  This means that the PGA460 would only send out every other ADC sample when SAMPLE_SEL=1.

    Regards,

    Mekre

  • I am using interrupt to send and receive the data. And when I'm plotting the data, the object's peak is at correct place. And my SAMPLE_SEL bit is also 0. 

  • Hi Yash,

    Can you show me a plot of the SCLK cycles and also measure the time between the first data byte and the last data byte?

    Thank you,

    Mekre