I know that the pic32 can not do both at the same time. In device mode the pic32 should be powered by micro B usb connector and act as a HID/Serial. In host mode it should give power to a USB type A connector and support things like a keyboard or a mouse/touchpad. I think supporting mass storage is too difficult compared to using an sd card so i want to keep the functionality of the USB to its basic needs.
I would like to be able to switch between those modes by way of a switch(es) or jumper(s). The simpler the better. I have checked most of the schematics microchip provides but none have this worked out and my understanding of USB is unfortunately not adequate enough.
Did any of you guys figured this out yet?