Atmega32U4 USB Device/HOST mode - atmega

Recently I have been studying the m32u4 usb. It has USBCON register, but no HOST bit which is used to change HOST/Device Mode. I want to know how i can convert the usb from device mode to host mode.
Could somone please help me? Thanks.

As far as I know Atmega32U4 doesn't support USB host mode. In order to acheive that you might need some other board or perhaps a seperate USB host IC.

Related

Atmel SAMD21 microcontroller not making a USB port anymore

My custom board with Atmel SAMD21 microcontroller (same as Arduino MKR Zero) is not making a USB port since yesterday. The board was working fine before that.
Please suggest ways to resolve this issue. What are the possible reasons for such an issue?
Since reset is equivalent to powering the board ON and OFF which has not resolved the issue, can burning the bootloader again help?
Further information:
The board seems fine. It powers ON and OFF in the usual manner.
This problem with the USB port connection happened while I was trying to upload the code.
The USB pin connections on the board have been checked as well as tested with different USB wires.
Appreciate your help.
Solutions to the problem:
External Hardware Reset -- using a reset button (that I externally managed to solder) -- to get into bootloader mode and start the program from the beginning
Burning bootloader again may also work (theoretically) - I have not tried and tested it.
For detailed understanding - follow this post - https://forum.arduino.cc/t/atmel-samd21-microcontroller-not-making-a-usb-port-anymore/882504/5

Upload Arduino sketches to Raspberry Pi via serial port

I am using the Arduino IDE and RasPiArduino (https://github.com/me-no-dev/RasPiArduino) to compile sketches for my Raspberry Pi Zero. It's working fine.
I figured that the Pi's USB OTG port could be used to directly upload the sketches via USB. So I have set up g_serial on the Pi and successfully logged into it using minicom. The Arduino IDE also lists the port under Tools -> Port. So far so good.
However, I am not yet able to actually upload a sketch over that port or to open the Serial Monitor. As far as I know, the IDE uses avrdude to upload sketches, but it seems that only works for Atmel chips? I am completely stuck here. Can this be done at all? Any ideas or pointers are greatly appreciated.
Thanks!
OK, I got it working as follows, thanks to the tip from jikuja:
Set up ethernet over USB using the gadget driver g_ether You may also have to set up a DHCP server (e.g. dnsmasq) on the Raspberry Pi in order to assign IPs to the Pi and the host. Details can be found here, for instance: https://gist.github.com/gbaman/50b6cca61dd1c3f88f41
Configure avahi to only provide the arduino service over the USB interface. To do this, modify /etc/avahi/avahi-daemon.conf and set options allow-interfaces=usb0 and deny-interfaces=wlan0.
The Arduino IDE (using RaspiArduino) should not be able to detect the Pi on the USB interface, but not the WiFi. Uploading sketches and serial monitor all work fine for me that way. :)

Nuvoton NUC120 Communication via Build in USB

I just bough NUC120, and there is nothing less than expected. What sparked my interest is, as stated on page 17-18 on the datasheet, It able to do UART communication. So far, I only use the USB port to uploading the firmware via ISP using NuMicro ISP Programming Tools. I've noticed (correct me if I'm wrong) that its the same concept with Arduino boards, where the USB port can be used to both programming and communication. I have do my research for several days, but still can't find how to do serial communication between Nuvoton and PC, since when I do programming using NuMicro, I use "USB" connection type, and on my PC, there is no COM PORT listed.
My question, Is it possible to do serial communication via Nuvoton USB port? If its possible, can you please point me where to look?
Thanks in advance. Please tell if I should add more details about this question.
You can find the examples in the BSP documentation. Look for samples of USBD_VCOM. To be able to communicate with your PC, you have to install the driver of Virtual COM manually

Ableton Live/M-Audio Fast Track conflict with USB keyboard

I am using Ableton Live 6 Lite with M-Audio Fast Track connected through USB port. I am having the following issue which I do not know how to resolve: I cannot simultaneously use sound recording with the above mentioned setup and a USB connected keyboard (just a regular USB keyboard which I use with my Toshiba Laptop PC). Either keyboard is not working or no sound reaches Ableton Live software. Any help would be really appreciated. Thanks.
It sounds like you are using a USB hub which does not have its own power source. You are drawing too much current so only one device can be powered at a time. Use USB ports directly on your computer or get a USB hub with its own power adapter.

Virtual com communications with no usb2uart bridge?

I'd like to connect a beagleboard-like (custom developed) omap board to a Windows PC using a virtual-com setup. That is, i'd like the board to appear to Windows as a com device and get the COM to send data to our application on the board. The main reason for that is to use virtual-com drivers on windows, since the usb drivers we use now to directly sent data over usb between the host and the board seem not to work properly.
I have done this using the FTDI driver on the past but as far as i know it worked because the device had an FTDI chip that translated the usb protocol to serial signals (am i right ?).If there's no USB to UART bridge on the board, how could i do that ?
By the way, how USB Communication Device Classes fits here ? Should develop a CDC driver for the board ? What should I use then on Windows side ?
I'm kind of confused, so any help will be greatly appreciated :)
Well, i answer myself :)
The solution lies in the Linux USB Gadget Subsystem.
Gadget API

Resources