Not applicable
May 18, 2013
06:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 18, 2013
06:15 AM
Hello,
I have created a Dave 3 CE project for Hexagon Application Kit with a UART001 app. Everything works fine in transmission and reception but when I start transmitting data using multiple times the function UART001_WriteDataMultiple(&UART001_Handle0,Data,sizeof(string)) the UART stops working at the moment that the transmit FIFO is full.
Have I to redirect the pointer of the FIFO? How can I solve this issue?
Thanks in advance and best regards,
MagicPhoton
I have created a Dave 3 CE project for Hexagon Application Kit with a UART001 app. Everything works fine in transmission and reception but when I start transmitting data using multiple times the function UART001_WriteDataMultiple(&UART001_Handle0,Data,sizeof(string)) the UART stops working at the moment that the transmit FIFO is full.
Have I to redirect the pointer of the FIFO? How can I solve this issue?
Thanks in advance and best regards,
MagicPhoton
2 Replies
Not applicable
Aug 19, 2013
04:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 19, 2013
04:18 AM
Hey Infineon-Team,
i got the same Problem and i don´t know why? plz help me
i got the same Problem and i don´t know why? plz help me
Not applicable
Aug 19, 2013
07:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 19, 2013
07:40 AM
I would like to explain the behavior. If I read the incoming characters:in a buffer
ISR:
can I send multiple characters with:
But if i want to send characters before Reading only got 3 characters...
Here my Uart Receive function:
ISR:
do{
tmpc = (uint16_t)UartRegs->OUTR;
if (!__BUF_IS_FULL(rb.rx_head, rb.rx_tail)) // If no more space, remaining character will be trimmed out
{
rb.rx[rb.rx_head] = tmpc;
__BUF_INCR(rb.rx_head);
}
}while(!USIC_ubIsRxFIFOempty(UartRegs));
can I send multiple characters with:
UART001_WriteDataMultiple(&UART001_Handle0,(uint8_t*)RecBuf,(uint32_t)strlen(RecBuf));
But if i want to send characters before Reading only got 3 characters...
Here my Uart Receive function:
uint32_t UART_Receive(const UART001_HandleType* Handle, uint8_t *rxbuf, uint8_t buflen)
{
uint8_t *data = (uint8_t *) rxbuf;
uint32_t bytes = 0;
// Temporarily lock out UART receive interrupts during this read so the UART receive interrupt won't cause problems with the index values
UART_IntConfig(UARTx, UART_INTCFG_RBR, DISABLE);
// Loop until receive buffer ring is empty or until max_bytes expires
while ((buflen > 0) && (!(__BUF_IS_EMPTY(rb.rx_head, rb.rx_tail))))
{
*data = rb.rx[rb.rx_tail]; // Read data from ring buffer into user buffer
data++;
__BUF_INCR(rb.rx_tail); // Update tail pointer
bytes++; // Increment data count
buflen--; // Decrement buffer size count
}
UART_IntConfig(UARTx, UART_INTCFG_RBR, ENABLE); // Re-enable UART interrupts
return bytes;
}