Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

JTAG UART crashes NIOS if no NIOS terminal is open

Hi

So, Nios was "crashing" for me. In truth, it just seemed to be dormant. As soon as I connected the Nios terminal, it magically came back to life, and some printf stuff got flushed out onto the Nios terminal.

Anybody seen this before?

I am guessing that the JTAG UART FIFO filled up. Should I really expect that Nios should simply carry on in its merry way regardless, or should it stop like this?

Thanks

Clive

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi clivewmwalker,

    id you solve this issue? I have the same problem. Thanks in advance.

    Marco
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Hi

    So, Nios was "crashing" for me. In truth, it just seemed to be dormant. As soon as I connected the Nios terminal, it magically came back to life, and some printf stuff got flushed out onto the Nios terminal.

    Anybody seen this before?

    I am guessing that the JTAG UART FIFO filled up. Should I really expect that Nios should simply carry on in its merry way regardless, or should it stop like this?

    Thanks

    Clive

    --- Quote End ---

    Working form memory there are different options when instantiatiating a JTAG UART which deternine if it is used for interacting with a human, or just for communicating with another device, and depending on these options there is a bit in the JTAG UART's control register that can be used by the device driver to determine if a terminal is attached. Depending on the application the software might choose to throw away some of the output characters if no terminal is attached, with the explicit purpose being to prevent a thread in the software from blocking when no terminal is attached.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I am seeing this problem with Quartus 14.1/16 versions.

    When I send data on uart with nios2-terminal not started, after a while NIOS stalls.

    Additionally, verified that DALTERA_AVALON_JTAG_UART_SMALL is not used in this case, which means full fledged driver with character drop is running.

    It does not look to be related to buffer size, as I could print characters more than the buffer could hold.

    Any input is well appreciated.