Forum Discussion

ABola2's avatar
ABola2
Icon for New Contributor rankNew Contributor
6 years ago
Solved

NIOS II is not responding on DE0 Soc board

I've created a project to use some PIOs in DE0 SoC board as a serial transmitter and receiver but nothing come out from the board.

Can you please help to know if there are some tricks I must do or any things I must avoid?

One more thing, I am suspecting the CLK source, Do I have to use a PLL?

  • Hi Amanda, Now I understand your design. Attached is a sample design for RS232 with NIOS II using two UARTs. I followed exactly the same Qsys design you have to make it easy to understand. This is based on DE0-Nano-SoC board. Sorry for having the code not commented, but it is simple enough to be clear for you. It sends data from one UART to another. on the board short the TX1 with RX2 to get the project function. In the TOP level change the assignments based on your board: RS232_1 u0 ( .clk_clk (FPGA_CLK1_50), // clk.clk .leds_ex_export (LED), // leds_ex.export .sw_ex_export (KEY), // sw_ex.export .uart_1_ex_RXD (RX_2), // uart_1_ex.RXD .uart_1_ex_TXD (TX_2), // .TXD .uart_0_ex_RXD (RX_1), // uart_0_ex.RXD .uart_0_ex_TXD (TX_1) // .TXD ); Please let me know if you still need support. Regards,

6 Replies

  • Abe's avatar
    Abe
    Icon for Frequent Contributor rankFrequent Contributor

    Why are you using two UARTs along with the JTAG UART? If I'm right you only want to send and receive data via Serial RS232 link. UART interfaces have Tx and Rx ports, so you only need to use a single UART along with the JTAG UART.

    By default the clock source on the board would be 50Mhz and it will be connected to one of the CLK pins on the FPGA. Make sure that the same clock pin is used as the clock source for your project.

    Also make sure that the RS232 UART interface that is exported is assigned to the correct pins that are connected to the serial port on the Dev board. Have you created the BSP and application software that makes use of the UART to send/receive data?

  • Ahmed_H_Intel1's avatar
    Ahmed_H_Intel1
    Icon for Frequent Contributor rankFrequent Contributor
    Hi Amanda, Yes, you don't have to use two UARTs unless you are planning to send /receive two two devices at the same time. I will create a similar design for you as an example. regards,
  • ABola2's avatar
    ABola2
    Icon for New Contributor rankNew Contributor

    Hi Embedded Guy,

    Thanks for your fast reply, I am using two UARTs to communicate with two devices, For now I will send from one and receive from the second and vic versa for testing. I am waiting your support.

  • Ahmed_H_Intel1's avatar
    Ahmed_H_Intel1
    Icon for Frequent Contributor rankFrequent Contributor
    Hi Amanda, Now I understand your design. Attached is a sample design for RS232 with NIOS II using two UARTs. I followed exactly the same Qsys design you have to make it easy to understand. This is based on DE0-Nano-SoC board. Sorry for having the code not commented, but it is simple enough to be clear for you. It sends data from one UART to another. on the board short the TX1 with RX2 to get the project function. In the TOP level change the assignments based on your board: RS232_1 u0 ( .clk_clk (FPGA_CLK1_50), // clk.clk .leds_ex_export (LED), // leds_ex.export .sw_ex_export (KEY), // sw_ex.export .uart_1_ex_RXD (RX_2), // uart_1_ex.RXD .uart_1_ex_TXD (TX_2), // .TXD .uart_0_ex_RXD (RX_1), // uart_0_ex.RXD .uart_0_ex_TXD (TX_1) // .TXD ); Please let me know if you still need support. Regards,