UDB Fifo read fails to raise empty flag | Cypress Semiconductor
UDB Fifo read fails to raise empty flag
My Intent: Develop a UDB datapath which compares values. A byte is written into the Fifo F0 register via Software or DMA if it is empty, which clears the F0_Empty flag. The written byte is then read into the datapath A0 register, which should raise the F0_Empty flag again, and compared to a pre-determined value. If the value doesn't match it is written from the A0 register into the F1 register, which will trigger an external read via Software or DMA by raising the "Not_Empty" flag.
Problem Statement: Moving the contents of the fifo F0 register into A0 via my udb state machine does not re-raise the F0_Empty flag. It seems that when I read the data from F0 with A0 the read/write pointers are not updated, and thus neither is the status of the empty flags.
I've Tried: I have confirmed that once written (in the very first state of my state machine), the F0_Empty flag goes from high to low as expected. I have confirmed that the data I send makes its way into register A0, which means A0 is definitely retrieving the data as expected.
Possible Areas of Concern: The Fifo's in the udb are 32 bits, could that mean that even if I only write 8 bits, there are 24 bits of zero padding being written into the Fifo, which incremented the write pointer by 4, and thus requires 4 reads to empty the Fifo? This is the only thing I personally could think of, can anyone confirm this?
I thought this information would be enough to get moving, but I've attached a copy of my workspace archive in case anyone was curious. Thank you ahead of time for any help I recieve on this topic, I've been banging my head against a wall for 2 days now over this.