Search results

  1. M

    Teensy USB delay

    Yes, it did already. Thank you. But maybe you can still clarify if these assumptions are correct. 1. The ISR is called when the USB HW is polled. 2. When being polled: I guess the the HW will not wait on the packet written by the ISR but sent the packet from the previous ISR.
  2. M

    Teensy USB delay

    Yes, I'm using a function from usb_dev.c. But I have been trying not to modify anything. I just include the usb_dev.h and usb_desc.h. The only thing I modified so far was the descriptor and major change there was to change the poll time. If possible I would like to continue not modifying the...
  3. M

    Teensy USB delay

    Teensy LC.
  4. M

    Teensy USB delay

    Hi, this question is about the achievable delay of a Teensy device. From my measurements it seems that the minimum lag I can achieve is 1-2x the polling interval. I am trying to reduce this to about 0-1x polling interval. Here is the (pseudo) code: void loop() { // Endless loop...
  5. M

    Teensyduino 1.48 Beta #3

    It's working now for me as well. Maybe this helps someone: To get it to work I had to remove the complete "Arduino" folder under home Documents. Then I reinstalled the libraries. I guess this had something to do with the access rights.
  6. M

    Teensyduino 1.48 Beta #3

    I updated to Catalina and did a fresh install of Arduino 1.8.10. I started Arduino, gave it full access rights to all drives and **was able to compile a sketch**. Then I executed the Teensyduino.app 1.48-beta3. After it finished I ran Arduino, set the board to TeensyLC and chose an USB Type...
  7. M

    Teensyduino 1.48 Beta #1

    Moved to beta 3 thread.
  8. M

    CDC_DATA_INTERFACE interval

    The CDC data interface specifies a USB poll interval of 0. See here: #ifdef CDC_DATA_INTERFACE // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12 9, // bLength 4, // bDescriptorType...
  9. M

    CDC vs SEREMU

    There are different devices available which offer a serial interface e.g. here: #if defined(USB_SERIAL) #define VENDOR_ID 0x16C0 #define PRODUCT_ID 0x0483 #define DEVICE_CLASS 2 // 2 = Communication Class #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}...
  10. M

    Which joystick is first?

    Thanks, this is of great help for me. So at least in Linux I will not have any problems. For the serial number: I guess if I have 2 different HWs they will automatically use different serial numbers. Or do I have to set the serial number in SW?
  11. M

    Which joystick is first?

    Hi, I would like to use the Teensy for a joystick project and I would like to know if there is a way to influence the order of the devices in the OS, e.g. Windows or Linux. If I attach 2 same Teensy boards/with same SW on it to a PC and switch it on, which of the devices will be the first...
  12. M

    Polling Joystick + Serial

    Hi, following problem. I have setup a Teensy LC as USB Joystick + Serial device with: #elif defined(USB_SERIAL_JOYSTICK) #define VENDOR_ID 0x16C0 #define PRODUCT_ID 0x0487 #define DEVICE_CLASS 0xEF #define DEVICE_SUBCLASS 0x02 #define DEVICE_PROTOCOL 0x01 #define...
  13. M

    Low level usage of timers

    Hello manitou, thanks very much, that was the problem. The prescaler is working now. BTW: I'm not using it to generate wave forms, so the PWM won't help me. Instead I use it to check that certain code paths are not taken longer than a certain time frame. I.e. if I execute some code and...
  14. M

    Low level usage of timers

    I have read the specifications on timers (KL26 Sub-Family Reference Manual) and partially got it to work but I still have a problem with the prescaling. I would like to start a timer at a high resolution, e.g. 1Mhz/1us, and run this timer for a given time. Then I don't want an interrupt to be...
  15. M

    Get notification on usb poll

    Thanks very much for the answers. @KurtE If I understand correct the send routine does not directly wait on a usb poll but writes into a queue. So as long as there are packets available it will not wait. But as soon as the queue is filled it waits until a packet from the queue (usb) is read by...
  16. M

    Get notification on usb poll

    I now found that 'usb_joystick_send' does wait until the next poll. But I haven't yet understood how the wait does work. For me it seems that it waits at this location in usb_tx: b->desc = BDT_DESC(packet->len, ((uint32_t)b & 8) ? DATA1 : DATA0); Is this correct? Does anybody know? And if so...
  17. M

    Teensy USB delay

    It seems that the problem is not the Teensy (LC) but the usblag. There seem to be lags when usblag is polling the USB. It tested on Linux without seeing this problem.
  18. M

    Teensy USB delay

    Hi, I've done latency measurements for the Teensy LC by connecting it to an Arduino with an usb host shield to measure the lag with the usblag project, see https://gitlab.com/loic.petit/usblag As test program on Teensy I used a very simple program: void setup() { pinMode(1, INPUT_PULLUP)...
  19. M

    Get notification on usb poll

    Hi, I would like to use a Teensy LC to check the polling rate of the USB Host (i.e. PC). Therefore I would like to toggle a digital out pin everytime that the PC polls the teensy device. Is this possible? What API can I use for it?
Back
Top