Is there a reason you don’t do this on the ARM processor? In the v4.8 kernel, the ADC uses DMA, so you can sample at full speed.
Regards, John > On Jan 26, 2017, at 8:10 PM, Renzo Fabián <[email protected]> wrote: > > > I have the following C code's parts that uses tables of sins and cosins to > calculate a fundamental phasor of 60 Hz electrical system using 16 samples > per cycle (960 Sps): > > float cosins[]={1, 0.92388, 0.70711, 0.38268, 0, -0.38268, -0.70711, > -0.92388, -1, > -0.92388, -0.70711, -0.38268, 0, 0.38268, 0.70711, 0.92388}; > > float sins[]={0, 0.38268, 0.70711, 0.92388, 1, 0.92388, 0.70711, 0.38268, 0, > -0.38268, -0.70711, -0.92388, -1, -0.92388, -0.70711, > -0.38268}; > > ... > > for(i=0; i <16; i++){ > ret_r=x[15-i]*cosins[i]+ret_r; > ret_i=x[15-i]*sins[i]+ret_i; > } > > return 0.088388*ret_r -0.088388*ret_i*I; > > Is it possible to perform this using the libpruio in order to read 6 analog > inputs? If yes? What is the best way to implement it if other operations were > need, i.e. compute the division of 2 phasors. > > Thanks. > > -- > For more options, visit http://beagleboard.org/discuss > <http://beagleboard.org/discuss> > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beagleboard/a0e5a09a-0468-404d-9bf2-3436a62065ea%40googlegroups.com > > <https://groups.google.com/d/msgid/beagleboard/a0e5a09a-0468-404d-9bf2-3436a62065ea%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/9C4AA6F4-0612-4ECD-8275-0F93EDE99744%40gmail.com. For more options, visit https://groups.google.com/d/optout.
