iMX257 USB Driver : Unable to access USB register space in Armadillo440

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

iMX257 USB Driver : Unable to access USB register space in Armadillo440

1,008 Views
sayan
Contributor II

While developing USB driver for Atmark Techno Armadillo440 board (iMX257), an issue is found during initialization of the USB controller. The USB register space cannot be accessed. The development IDE crashes while USB register space is accessed.

Some observations:

  1. Registers other than USB Host controller (for example CCTL, IOMUX, MCR etc.) can be accessed without any problem.
  2. Registers of USB controller common to OTG and Host (USBOH) [within offset 0x0600 to 0x060c] can only be read though they are R/W registers. Writing on them are not reflected.
  3. Registers of USB Host controller (within offset 0x0200 to 0x03A8) and OTG (within offset 0x0000 to 0x01DC) can neither be read nor write. Trying to access them is crashing the development IDE. Note: USB Base address: 0x53FF4000
  4. From Hardware manual of Armadillo440 (http://armadillo.atmark-techno.com/files/downloads/armadillo-460/document/armadillo-400_series_hardw...), it is found in Power Circuit Make-up Diagram, that NFWE_B(GPIO3_26) is needed for USB_PWRSEL.
  5. Tried to access the USB Host controller register after setting IOMUXC_SW_MUX_CTL_PAD_NFWE_B with ALT5 i.e. 0x00000005 but failed to access the registers.
  6. Tried to access the USB Host controller register after setting IOMUXC_SW_MUX_CTL_PAD_NFWE_B with ALT5 i.e. 0x00000005 and setting GDIR[26] of gpio3 to 1 and failed again.

Need the pin muxing options (or required settings) for Armadillo440 so that USB Host controller registers can be accessed.

Labels (1)
0 Kudos
5 Replies

818 Views
art
NXP Employee
NXP Employee

The access to the USB controller registers is not related with the IOMUX settings in any way. The most likely cause of the issue is that you have not enabled the clocks for the USB controller module or something like. Please check it first.

Also, as the development reference, you can use the existing USB driver, available as the part of the Linux BSP for the i.MX25 PDK board, that can be found on the processor's Software&Tools web page:

http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-process...


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

818 Views
sayan
Contributor II

By enabling hclk_usbotg I can read/write in the OTG core registers i.e from offset 0x0000 and found them to be in default value according to the specification. But the Host core register space i.e from offset 0x0200 are all read as zero. Default values are not found. Even writing into them is not reflected. 

Is there any other clock setting necessary to get the default values and write successfully in the Host core register?

Regards,

Sayan

0 Kudos

818 Views
sayan
Contributor II

Thank you for the information.

I have found a clock setting and able to read/write USB Host controller registers.

I had an idea that this is for pin muxing problem. If possible can you please say why this is not related to pin muxing? I mean how to understand whether this type of problem is due to pin muxing or clock settings?

Regards,

Sayan

0 Kudos

818 Views
art
NXP Employee
NXP Employee

Accessing the registers is the process, internal to the SoC, and it is not related with any external signals at all. So, if you cannot access the module's registers, most likely, you have not clocked this module to make it functional.

Best Regards,

Artur

0 Kudos

818 Views
sayan
Contributor II

Thank you very much for the information. 

Regards,

Sayan

0 Kudos