I am doing a Nordic project, that need to be a USB host. May I know how to make nRF52840 to be a USB host ?
I am doing a Nordic project, that need to be a USB host. May I know how to make nRF52840 to be a USB host ?
I have found that the nRF52840 is not capable of being a USB host, it's peripheral only. I've concluded that from this devzone post and this infocenter entry.
You can use a microcontroller with USB host functionality and another communication protocol compatible with the nRF52840 or a USB bridge IC. I'm doing the same thing at the moment using an SPI to USB bridge.
guys do you have tried the Vinculum-II? I also want to connect a nRF5840 to a CDC Modem using AT commands a give it cellular functionality. at the moment no luck to make work the Vinculum II
Hi Kevin,
Thanks for the suggestions. It will be helpful reference if we can have a link where we can find the reference code.
Akarsh
Hello Akarsh,
If you search for "MAX3421E code" or "MAX3421E github" on google you will find multiple libraries. 2 examples:
https://github.com/felis/lightweight-usb-host
https://github.com/greiman/UsbFat/blob/master/USB_Host_Shield_2.0/max3421e.h
As for the SPI on the Nordic chip I will assume you're using SDK 16.0.0. This is the documentation for the example code for an SPI master:
Kevin
Hello Kevin!
I have a nrf52840-DK and Arduino USB Host Shield combo. Setting communication bits is just fine, I also can read the revision number.
I've stuck over a problem though. In code examples you've specified there is a loop waiting for OSCOKIRQ for PLL/internal oscillator to stabilize. Same loop is in every code for MAX3421e I was able to find.
OSCOKIRQ is never set on for me. There is a thread at Electrical Engineering StackExchange claiming it is a bug in MAX3421e. I doubt this is the case, it certainly would be noticed, at least by felis/USB_Host_Shield_2.0.
I am running nrf52840-DK connected and powered via USB, nothing is connected to the shield, I can set communication bits and read revision number. So I guess it is enough power for PLL, right?
My question is - have you seen this problem in your project? Was waiting for OSCOKIRQ working for you? Or you've just skipped this stabilization part?
Sorry for bugging you, but I am really desperate right now. (
Hello,
As I have mentioned before, I haven't worked on this project in a long time.
I do however remember something along the lines of OSCOKIRQ not being set, and actually read the same thread at stackexchange. I think the problem back then was a lack of power because the nRF52840DK cannot provide enough current to the MAX3421E-EVKIT.
Try looking up the power specification for you board and checking if you're providing enough. If not, use an external power source.
Good luck,
Kevin
Yeah, I've thought about it too, but hoped if nothing is connected to MAX3421E, it would be enough for oscillator. Guess I'm wrong.
Thanks!
Yeah, I've thought about it too, but hoped if nothing is connected to MAX3421E, it would be enough for oscillator. Guess I'm wrong.
Thanks!