I'm trying to use Arduino MKR Vidor 4000 with MKRMotorCarrier for haptics and -for my application- it is very important to read two encoders from the FPGA very fast! Using the VidorGraphics library, function encoder.read() seems to call VidorMailbox.sendCommand(...) and afterwards I see that the library calls VidorJTAG.writeBuffer(...) and VidorJTAG.readBuffer(...). Well I'm nor very confident following this code, but it seems that if you want to know the encoder counts from the FPGA you have to ask for one first, wait for the response, ask for the second encoder count, wait for the response, and so on. This takes a lot of time... I wonder if:
- Is it poosible to speed up the VidorJTAG communication of VidorGraphics library?
- Is it possible to rewrite some of the functions of VidorGraphics library to ask for two or more encoder counts in the same "message" using this VidorJTAG communicatios?
Thanks in advance!