Did you enable global interrupts. Without seeing project hard to judge
what is going on.
“Create Workspace Bundle”
I've succeeded. RX interrupts are triggered when all intr (RX) are on.
However during all interrupts (around 8) FIFO is empty , so no data read (and no error). I love it
UART_RX_FIFO_STATUS_REG is 0 all the time
Do You know any UART example working with ProcBLE and Tx and Rx enabled?
Do You know any TRM for this chip?
How could it be, that RX_INTR_NOT_EMPTY is triggered, but _RX_FIFO_STATUS_REG is 0? My imagination is failing
Status reg inform about data available (first 3 bits)
At the same time fifo ctrl reg is 7
As Dana already suggested:
Can you please post your complete project, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
What does it mean if on FIFO reg(0x40240340) there is a value 0xFF, but Cypress API return 0?
How can you be sure that you are referring to the right register (0x...) after a build? Maybe you've reset the bits already by reading them.
Post your project, we'll see.
As always marketing is far ahead of reality.
in my case FIFO has 0xFF. then fifo is translated into uint32. SO we have 0xFFFFFFFF. Then we get error value and or with FIFO
result. In my case (ff OR 0x40) has ff which means error is ff.
This is the first BUG i've found here
How could it be, that NOT_EMPTY event is triggered, but where FIFO read we have event 0x40 ( trying to read empty FIFO)?
What I see is related to any UART example, so neither example can work. This is why CYpress published example which read FIFO without interrupts. My UART case is real life scenario, and polling byte by byte is not possible
This is a cypress code where BUG is:
rxData = Sim900_RX_FIFO_RD_REG;
>>>rxData is 0xFFFFFFFF. How 8-bit FIFO data can become 32bit value is another story to investigate
/* Enables interrupt to receive more bytes.
* The RX_NOT_EMPTY interrupt is cleared by the interrupt routine
* in case the byte was received and read by code above.
/* Get and clear RX error mask */
tmpStatus = (Sim900_GetRxInterruptSource() & Sim900_INTR_RX_ERR);
/* Puts together data and error status:
* MP mode and accept address: 9th bit is set to notify mark.
rxData |= ((uint32) (tmpStatus << 8u));
>>>rxData is 0xFFFFFFFF again masking error
Without your complete project (or at least a project that shows the error) anything could be guessing only.
What are the component's buffer size? which component do you use and which version? Any other settings that could affect your receiving?
# of bits, baud, clock settings.......
I agree. Painful problem isolation. Create the test case is time consuming but I have to find time.
Meantime I've found out that UART_DONE (for TX line) interrupt loops forever blocking chip functionality.
ClearTxInterruptSource(UART_INTR_TX_UART_DONE); doesn't work