Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Honored Contributor I
743 Views

Data is not updated as frequent as desired - UART, interval timer

Hi all, 

 

I have a Nios system with Qsys components such as Interval timer, UART, SDRAM and some PIOs. My system specifications are DE0 Nano, Quartus 12.1 sp1, Altera monitor program. Nios II system are interfacing with several VHDL blocks. 

 

 

I am able to read data from FPGA to Nios processor, then transmit this data to Uart component created in Qsys using direct register method (IORD_ALTERA_AVALON_UART_STATUS (UART_BASE);  

IOWR_ALTERA_AVALON_UART_TXDATA(UART_BASE, txdata);etc). 

 

I am using usb-to-serial interface to the board FTDI UM245R module. 

 

I am able to read serial port and plot the graph real time in Matlab. However, I am having the issue where the data is not updated as frequent as desired. 

 

In my C code, I want the parameter say parameter A to be updated every 0.2 seconds, so I expect to see 30 sets of data being updated within 6 seconds, however, it is only updated 3 sets within 6 seconds, I can see that the sequence/order it updates is correct, just that it is updated slower that it is supposed to be. 

 

I suspect two reasons: 

1.Interval timer core, so I change the timer from 0.2 seconds to 0.1 seconds, it makes no difference to the results though 

2. Matlab code, timeout parameter, I set it to be 5 seconds, if I set it less than this, I will get an error saying the serial: data not returned within the timeout period. 

 

I am asking if anyone of you has encountered this problem, could you please tell me what are the perspectives for me to look into? as I don't know what is wrong and what is causing this problem. 

 

Thank you in advance 

0 Kudos
0 Replies