Jump to content
43oh

Clavier

Members
  • Content Count

    52
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. Like
    Clavier got a reaction from Fmilburn in power consumption for sensors/ parts in sleep mode   
    If those sensors/parts use too much power when idle, you need to switch them off somehow.
     
    If they don't have a power-down command/signal, you have to switch off their VCC. This can be done either with a transistor (a logic-level MOSFET would need slightly less power than a BJT), or directly with a GPIO if the sensor does not need much power.
     
    Please note that some chips do not allow high voltages on their I/O pins when VCC is zero; those might need protection, too.
  2. Like
    Clavier got a reaction from tripwire in power consumption for sensors/ parts in sleep mode   
    If those sensors/parts use too much power when idle, you need to switch them off somehow.
     
    If they don't have a power-down command/signal, you have to switch off their VCC. This can be done either with a transistor (a logic-level MOSFET would need slightly less power than a BJT), or directly with a GPIO if the sensor does not need much power.
     
    Please note that some chips do not allow high voltages on their I/O pins when VCC is zero; those might need protection, too.
  3. Like
    Clavier got a reaction from RobG in How to set up MIDI over USB   
    The endpoint numbers must match everywhere (in the descriptors and in stUsbHandle).
     
    The endpoint index must be one less than the number.
  4. Like
    Clavier got a reaction from Josh in How to set up MIDI over USB   
    The endpoint numbers must match everywhere (in the descriptors and in stUsbHandle).
     
    The endpoint index must be one less than the number.
  5. Like
    Clavier got a reaction from Josh in How to set up MIDI over USB   
    After a timeout error, the data is still in the buffer. As long as there still is data in the buffer, USBCDC_sendDataXxx will fail. You have to ensure that the host reads the data; and as long as that doesn't happen, there will be no interrupt.
     
    The USB Audio specification requires that the device has two interfaces, an Audio Control interface (which doesn't do much for a MIDI device; it just lists the other interface), and a MIDI streaming interface. If you never see actual data being transferred to the host, this might be the problem (but then it shouldn't have enumerated any MIDI port).
     
    The interface number you give to the CDC functions is used as an index into several arrays. So when you have a single "CDC" interfeace, you must use zero for these parameters; it is apparently not necessary for it to have the same value as the USB interface number.
     
    Zero packets are not used with MIDI. However, they would be generated only when a USBCDC_sendXxx call happens to completely fill its last USB packet (64 bytes), which is not possible for shorter messages. In any case, the host should just ignore them.
  6. Like
    Clavier got a reaction from Josh in How to set up MIDI over USB   
    TI's USB stack is designed for be used with the four supported device classes.
    To implement another device class, you have to insert custom code at all the appropriate places. However, this is still easier than writing the entire USB stack from scratch.
     
    USB MIDI is similar to CDC, which just transfers bytes over bulk pipes. In the case of USB MIDI, you have the four-byte event packets instead of bytes, but the overall management of the USB packets should be identical.
     
     
    First, use the descriptor tool to generate a program for some other device class.
    Then manually replace the descriptors in the USB_config/descriptors.* files.
     
     
    Start writing code! 
  7. Like
    Clavier got a reaction from yyrkoon in Peripheral connection between devices.   
    Devices using I
  8. Like
    Clavier got a reaction from B@tto in XT2 utility on F5529LP   
    Read section 40.2.3 of the User's Guide.
×
×
  • Create New...