Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

max310x: max14830 transmission freeze.

22 views
Skip to first unread message

Andreas von Cysewski

unread,
Apr 8, 2019, 6:01:42 AM4/8/19
to
Dear all,

I'm working currently on problem with transmission freeze on our MAX14830 UART.
The last changes with separate configuration of MODE1 Registers, have disabled autosleep mode for this UART.
But we have still problem with transmission freeze. In the last fall, the MAX14830 Revision 0xB3, the all registers have correct value but the transmitter was not working.
I have found this a note, in the datasheet of MAX14830 on page 31 under IRQEn Register description:

Note that an error can occur in the TxFIFO when a character is written into THR at the same time as the transmitter is transmitting out data via TX. In the event of this error condition, the result is that a character will not be transmitted.
In order to avoid this, stop the transmitter when writing data to the THR. This can be done via the TxDisable bit in the MODE1 register

In all other MAX310x datasheets the same note is under description of THR Register.
In accordance with this I have modified localy a max310x file with:


+++ max310x.c 2019-04-08 11:50:07.622999999 +0200
@@ -728,9 +728,13 @@
unsigned int txlen, to_send, until_end;

if (unlikely(port->x_char)) {
+
+ max310x_port_update(port, MAX310X_MODE1_REG, MAX310X_MODE1_TXDIS_BIT, MAX310X_MODE1_TXDIS_BIT);
+
max310x_port_write(port, MAX310X_THR_REG, port->x_char);
port->icount.tx++;
port->x_char = 0;
+ max310x_port_update(port, MAX310X_MODE1_REG, MAX310X_MODE1_TXDIS_BIT, 0x00);
return;
}

@@ -741,6 +745,7 @@
to_send = uart_circ_chars_pending(xmit);
until_end = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE);
if (likely(to_send)) {
+ max310x_port_update(port, MAX310X_MODE1_REG, MAX310X_MODE1_TXDIS_BIT, MAX310X_MODE1_TXDIS_BIT);
/* Limit to size of TX FIFO */
txlen = max310x_port_read(port, MAX310X_TXFIFOLVL_REG);
txlen = port->fifosize - txlen;
@@ -758,6 +763,8 @@
/* Add data to send */
port->icount.tx += to_send;
xmit->tail = (xmit->tail + to_send) & (UART_XMIT_SIZE - 1);
+
+ max310x_port_update(port, MAX310X_MODE1_REG, MAX310X_MODE1_TXDIS_BIT, 0x00);
}

if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)



Regards
Andreas.

0 new messages