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.

PGA450Q1EVM: Infinite loop on FIFO pointer in burst_cap_comp function

Part Number: PGA450Q1EVM
Other Parts Discussed in Thread: PGA450-Q1

Hello!

I am using rev 2.8 of the firmware available on the PGA450Q1EVM main page and trying to read back echo information using UART interface.

Using Hercules SETUP utility and communicate with the PGA450 using the UART interface, I am able to send command 0 and get the proper checksum response from the PGA450.

However, running command 2 always hangs indefinitely. I did some debug printing around line 580 and noticed that the while loop does not exit when lcv = 0x2FD = 765 (see screenshot below).

Here is what I have figured out so far:

1) The role of this loop is to wait until the desired FIFO address (lcv) has been filled. Hence I deduce that FifoWritePointer.u16 never takes a value greater than 765 which means that the FIFO RAM addresses 766 and 767 are never filled?

2) Doing some additional printing inside the while loop, I notice that the FIFO pointer keeps changing constantly, increasing on average by 0x3E = 62 per loop and keeps doing so even after going beyond 760 for instance. For instance, a possible sequence of values for FifoWritePointer.u16 could be ...569, 633, 695, 757, 51 (last 2 bytes of 757 + 62). Hence the stopping condition "lcv >= FifoWritePointer.u16" is never met and the loop is stuck.

3) The documentation SLDS185D p.42 mentions that in long range mode, the FIFO pointer increases by 2 but as I noticed previously, I see it increase by 62 on average for each loop iteration... This value of 62 changed to 42 when I did some more printing..

Here are my questions

  1. Is this a bug in the current code?
  2. Has command 2 worked and reported some ranges before for anyone?
  3. Is it normal that the FIFO pointer is constantly changing, even when it has already looped through the whole FIFO RAM once?
  4. Finally, what is your recommendation? (more elaborate stopping condition detecting when we first go over 767?)

Thank you in advance for the support!