- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
we are using the peripheral UART of the BCM20736S SiP module extensively for communication with our main MCU on a custom PCB. At the moment I got our custom services and characteristics running thanks to this forum!
I already devised a packet-based UART protocol that takes the 16 bytes long FIFO of the BCM20736S into account, i.e. maximum packet size is 16 bytes, which is somewhat of a nuisance as we use 20 bytes long characteristics that need to be transferred in multiple packets.
While experimenting with different funcitons we found the following:
void puart_write(UINT8 byte);
void puart_print(char * string);
BOOL32 puart_read(UINT8* readbyte);
void puart_synchronousRead( UINT8* buffer, UINT32 length );
void puart_synchronousWrite( UINT8* buffer, UINT32 length );
Is it correct, that puart_write, puart_print and puart_read use the underlying RTOS and don't care much about the hardware FIFO size of 16 bytes?
And when using the puart_synchronousRead and Write functions they directly interface the hardware?
Should I revise the UART protocol, because packets can be longer than 16 bytes?
Thanks in advance!
Best regards
Hannes Baumgart
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
puart_read/puart_write will never underflow/overflow the FIFO (they always check to see if the FIFO has bytes/not full before reading/writing).
puart_synchronousRead/puart_synchronousWrite may underflow/overflow the FIFO. So you should know how many bytes you can read/write from/to FIFO before you call these.
puart_print is a string printing function that looks for a null terminator to indicate when to stop printing. It uses puart_write to do the actual write.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
puart_read/puart_write will never underflow/overflow the FIFO (they always check to see if the FIFO has bytes/not full before reading/writing).
puart_synchronousRead/puart_synchronousWrite may underflow/overflow the FIFO. So you should know how many bytes you can read/write from/to FIFO before you call these.
puart_print is a string printing function that looks for a null terminator to indicate when to stop printing. It uses puart_write to do the actual write.