wjasper / Linux_Drivers

Open source Linux device drivers
GNU General Public License v3.0
111 stars 64 forks source link

USB-CTR timer status readback #33

Open MarkRivers opened 5 years ago

MarkRivers commented 5 years ago

usb-ctr.c contains this:

void usbTimerControlR_USB_CTR(libusb_device_handle *udev, uint8_t timer,  uint8_t *control)
{
  /*
    This command reads/writes the timer control register
    control:   bit 0:    1 = enable timer,  0 = disable timer
               bit 1:    1 = timer running, 0 = timer stopped
                        (read only, useful when using count)
               bit 2:    1 = inverted output (active low)
                         0 = normal output (active high)
               bits 3-7: reserved

I have tested using this function to read the status in bit 1. However, it does not work, control always returns 0 even if the timer is running.

Have you tested this?

If it works for you then perhaps I need new firmware? What firmware are you using?

wjasper commented 5 years ago

I'm using firmware version 00.46, and I'm getting 0x0 also. The device is returning a byte, so that part is working. I sent and email to MCC to see if they can help.

MarkRivers commented 5 years ago

I have looked hard and their UL library API provides no way to read the information. I was excited when I saw that the Linux API seemed to support it. Even if they make new firmware that does it, they will need to add it to their UL API.

MarkRivers commented 5 years ago

Did you get any response from MCC about this issue?

wjasper commented 5 years ago

MCC is looking into this issue. I will keep this open until resolved.