In the MQX documentation for the TWR-K20D50M board it states "For using USB Host mode, jumpers on position: TWR-K20D50M board, J26 on position 1-2 (That's correct), TWR-K20D50M board, J30 on position 5-6 (VREGIN)." This last jumper J30 5-6 IS INCORRECT. That position, when the TWR board is hooked up to a USB Device (like a mouse) leaves the MCU UNPOWERED. J30 5-6 powers the MCU from the micro USB port. A USB Device has no power! When connected to a PC having J30 on position 1-2 powers the MCU with 1.8 volts.When connected to a PC having J30 on position 5-6 powers the PC with anywhere from 5.2 to 6.5 volts (PC USB Powered).
Take a look at the schematic again. Then inputs to J30 are "(6) P5V_K20_USB" for Jumper position 5 and "P5V_TRG_USB" for Jumper poistion 1. When the board is hooked up to a standard USB device, like a mouse, the is no USB power! A USB device cannon SUPPLY power, so using Jumper position 5 leaves the MCU UNPOWERED. With an USB device that cannot supply power you HAVE to use Jumper position 1 to get power to the MCU.
I tested the host hid_mouse demo with the TWR-K20D50M board.
When Jumper 30 position 1-2, this demo can work, but VREGIN is 2.1v, not meets the USB spec. Maybe some other demos can't work.
When Jumper 30 position 5-6, MCU unpowered.
When Jumper 30 position 5-6 and together with default setting 1-2 , then VREGIN is 5V, meets the USB spec. So for using host mode, jumper 30 should be position on 5-6 , and 1-2.
This documentation seems not very clear. I will inform the document team about this.
Thanks for your feedback.
J30 should be on position 5-6 for using USB host mode, also for using USB device mode.
Please see the below picture.
For Host mode, J26 is position 1-2, P5V_USB powers Micro USB port and VREGIN.
For Device mode, J26 is open, Micor USB port powers VREGIN