What are the PUART FIFO Rx interrupt threshold settings?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

The PUART examples use:

// set watermark to 15 byte - will interrupt after 15bytes have been received.
P_UART_WATER_MARK_RX_LEVEL (1);

[Note: trying to paste code into this forum seems quite difficult. I kept getting tables inside a pre, and the editor doesn't seem to deal with them gracefully, and I really didn't want a table anyhow.]

The macro expands to writing a register at 0x003604ac.  I can't find any documentation explaining what the legal values to pass to the macro (or write to this regster) are. Can someone please either explain the settings, or point me to documentation that does?

I want to get the Rx interrupt *much* earlier, rather than when there's only one byte of FIFO left.  Since the SIPs apparently can't actually support flow control (based on other forum postings), the application I'm developing for a client is running with no flow control, and I'm having trouble with losing Rx data when the BLE stack is doing stuff, apparently with interrupts disabled for way more than one Rx character time.

Since the hardware FIFO is 16 bytes, and setting the watermark to a level of 16 bytes is done using a value of 1, I had hoped that maybe the value for an n-byte watermark was 16-n, but my experiments with that haven't been successful. Passing 12 to the macro resulted in not receiving any characters at all.

Is there any *real* documentation for the PUART, that I've somehow overlooked? The doxygen stuff is spectacularly unhelpful about any of the macros, and not much better about the functions. IMHO this seems like one of the worst-documented chips ever, but maybe the documentation is just hard to find.

Thanks!

Eric

0 Likes
1 Solution
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

embeddedmasters can help you with the cut and paste problem into Eclipse.

The online documentation is all we provide. Note that many lower level APIs are intentionally hidden and not intended to be publicly exposed for reasons outside the scope of this discussion.

// The following will set the watermark value to 1 byte and trigger an interrupt on every byte received.

P_UART_WATER_MARK_RX_LEVEL (1);

There are a few threads on this subject you should take a look at, both contain sample code:

UART Routines

UART does not receive

There are many more PUART related threads here as well: WICED Smart Forums

vik86WICED Smart Forums

View solution in original post

3 Replies