mpc5748 as an USB device

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mpc5748 as an USB device

1,855 Views
michaelbinz
Contributor III

We want to connect the devkit-mcp5748g board as an USB cdc device to a host computer.

I had a look into the USB samples available with the newest SDK (S32_SDK_BETA_2.9.0)  usb_cdc_lwip and usb_msd_fatfs.  These implement an USB host.

I checked the discussions in this board and found out that no sample code for the devkit-board as an USB device exists.

Since we have solid USB know-how, we thought about implementing the missing functionality on our own.  Since this board and processor is new for us, we need some support:

Is it possible at all to implement an USB *device* on the devkit-mcp5748g board? The USB0OTG unit described in chapter 47.2.1 of the mpc5748g data sheet rev 7.1 seems to be connected to OpenSDA in the devkit schematics.

USBHS (USB1) described in the data sheet in chapter 47.3.1. can only operate in host mode.

Is it possible to use the USB micro connector on the board for application purposes if JTAG is used for debugging? Our application actually just needs a serial port over USB, the less we have to implement the better and it seems as if OpenSDA already communicates as a device.

Tags (1)
4 Replies

1,551 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Michael Binz

Answering your questions:

Is it possible at all to implement a USB *device* on the devkit-mcp5748g board?

It is possible, but you have to look for the ULPIO0 pins in the schematic, those pins represent the USBOTG from the Reference Manual, the problem here is that this USB is not enabled in the board, so you would have to make a rework.

Is it possible to use the USB micro connector on the board for application purposes if JTAG is used for debugging?

Yes, the OpenSDA represents a bridge of a USB device CDC and UART communication, so yes, you can use this UART to communicate with a PC.

Best regards

0 Kudos

1,551 Views
madjidlho
Contributor II

Hello Mr jorge_a_vazquez‌,

I'm trying to realise the USB device driver but i'm facing an issue. In the reference manual, at multiple locations, there is /are a reference to a register called

-"ENDPRIME"

-"UOTG_ENDPRIME"

-"EEPRIME"

but i dont find it/them in the document. It seems like this/these register is used in other NXP mcu using the USB stack. Please see bellow screenshots.

I'm working with this document :  "MPC5748G Reference Manual, Rev. 7.1, 01/2019"

Could you help with this topic please?

Thanks in advance.

Madjid

pastedImage_1.png

pastedImage_2.png

0 Kudos

1,551 Views
michaelbinz
Contributor III

Hi Jorge,

thanks for your reply.

Is it possible at all to implement a USB *device* on the devkit-mcp5748g board?

It is possible, but you have to look for the ULPIO0 pins in the schematic, those pins represent the USBOTG from the Reference Manual, the problem here is that this USB is not enabled in the board, so you would have to make a rework.

Could you please give some detail on the required rework?  We identified the ULPIO0-pins in the schematic description on sheet 7, e.g.  ULPI0_STP.  The corresponding host pin is connected on sheet 11 as USB1_STP via a bridge R74 (zero ohm) resistor.

If we remove R100 in sheet 11 then the phy is in OTG/Device mode.

 

What needs to be done to route the ULPI0_STP to the USB1_STP pin 29 of the USB phy USB3340?  Is it possible to do this without extensive rewiring of the pins? (Please note that the xxx_STP pin is only an example, we expect that the procedure valid for the _STP pin is also valid for the other pins.)

Best wishes,

Michael.

0 Kudos

1,551 Views
madjidlho
Contributor II

Hello michaelbinz‌,

We are facing the same issue. We use this board, it has both usb wired and ready to use through a connector :

MPC574XG-MB

Please note that you will also need the daughtboard : 

MPC574XG-324DS

Good luck with the USB stack! It has only HOST implementation right now.

Madjid