0
\$\begingroup\$

I am using a MAX14830 as an I2C-UART bridge. My problem is that it does not trans it after I write data to the transmit (THR) register.

My initialization procedure is as follows:

  1. Reset the chip (set but RST from MODE2 register);
  2. Clear RST bit;
  3. Clear FIFOs (set FIFORst from MODE2 register);
  4. Clear FIFORst from MODE2 register;
  5. Clear interrupts (by reading the ISR register).

Afterwards I write data (bytes) to the THR register, but it does not transmit anything on any of the 4 UARTs. Instead, the TX FIFO level is always increasing (TxFIFOLvl). Also, I confirm the transmitter is enabled (the TxDisabl bit from MODE1 register is cleared), the clock signal is OK (I measured it using an oscilloscope after configuring the chip to output it on one of the GPIOs) and I2C communication works fine.

Does anybody know what is the problem? Can it be a faulty chip? Any suggestions on how to further debug this issue?

\$\endgroup\$
7
  • \$\begingroup\$ External comms inputs might not be set correctly. Does it have any external hardware handshake lines that need to be set correctly? \$\endgroup\$
    – Andy aka
    Commented Jun 12, 2021 at 7:51
  • \$\begingroup\$ @Andyaka Hi. I do not use the RTS and CTS lines. Also, I checked the flow control register (FlowCtrl) and its value is 0, so no AutoRTS or AutoCTS is used. It is very strange that the FIFO buffer always keeps increasing on all the UARTs, when it should be decreasing since the chip should automatically transmit any byte found in the buffer. It suggests this may be a software issue (or a faulty chip). \$\endgroup\$
    – Cristian M
    Commented Jun 12, 2021 at 13:20
  • \$\begingroup\$ Do you have your clock set up correctly? Need an XIN input and some setup of baud rate, PLL, etc. If that's not there then it makes sense your FIFO level increases: you keep adding bytes to the FIFO but they are not being emptied. \$\endgroup\$
    – td127
    Commented Jun 13, 2021 at 2:05
  • \$\begingroup\$ So, what have you got electrically connected to RTS and CTS. Having nothing connected isn't an option despite what you say. \$\endgroup\$
    – Andy aka
    Commented Jun 13, 2021 at 8:24
  • \$\begingroup\$ @td127 I confirm the clock is set up correctly. I verified it by outputting it on one of the chip's GPIOs and measuring it using an oscilloscope. I also checked the clock signal on the crystal's pins and it is OK. \$\endgroup\$
    – Cristian M
    Commented Jun 14, 2021 at 12:02

1 Answer 1

0
\$\begingroup\$

It turns out it was an incorrect setting. I mistakenly set the ClkDisabl bit high and that disabled communication. Now I have the problem that the data is transmitted in 7-bit format, not in the standard 8-bit format. But this is a different issue.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.