Is there any conflicts between sampling the input pin of xmo

If you have a simple question and just want an answer.
jigneshprajapati
Member
Posts: 10
Joined: Tue May 13, 2014 12:54 pm

Is there any conflicts between sampling the input pin of xmo

Post by jigneshprajapati »

I am trying to interface ADC with XC-2 eathernet board. our application is to get the data from ADC and send to the PC via eathernet UDP protocol.For that we have used sc_xtcp module.please see the snippet of code in the attachment .we get the 32 bit data using buffered port after checking DRDY pin. on the next we are sending the data to streaming channel.streaming channel is in the UDP event where the data is transmit to server of UDP.we have try to get 100 samplefrom ADC. so DRDY pin goes high from low 100 times each at 12.8 microseconds.But we are getting only 12 samples in PC.If we are not sampling the data after DRDY and only send any data then we get 100 samples in PC.Is there any conflicts between sampling the input pin of xmos and sending the data to TCP/IP via streaming channel?
You do not have the required permissions to view the files attached to this post.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am

Post by mon2 »

Use of printf / printintln is very slow.

Consider to revise the code to use real time printf ideas as suggested here:

https://www.xmos.com/search/content?ter ... +real-time

and redirect the printing function to use xScope for debugging.