AnsweredAssumed Answered

the extended SARM via FSMC could affect the recognition of USB

Question asked by sun.hiking on Mar 29, 2012
Latest reply on Mar 29, 2012 by Clive One

Recently to use STM32F103ZET6, version of the "Y".

USB virtual serial port is used.

And external expansion RAM model for IS62WV51216BLL configuration

system_stm32f10x.c version * @ version V3.0.0 * @ the date 04/06/2009

Description of the phenomenon:

① When using the internal RAM:

USB recognition from there have been no problems

② When using an external RAM:

Most of the old computers (DELL520, LENOVO E43, T400, X200, ThinkStation S20) for the recognition of USB no problem.

When using a new computer (the LENOVO X220, the United States purchased the Samsung NP-QX411L), USB recognition randomly display for UNKNOW the DEVICE or assigned port number but a yellow exclamation mark.
Samsung NP-QX411L with two USB3.0 serial, the usb recognition no problems.
But USB2.0 interface is always a problem.

 

The void USB_Istr (void)

  wIstr = _GetISTR (); / / read USB Interrupt Status Register 16bit

 

Found when wIstr recognition the correct value for 0x0B00

       recognition problems when value is 0x2B00

Personal feeling:

The use of external RAM before the main function, but only 12 lines of the register configuration, there is no form of library functions, configured and can not be processed again.

Before heard of the FSMC, and DMA access conflict. It is said that the "Y 'version of the above has been resolved, I would like that this USB recognition problem whether people have ever occured, or is a bug? !How to solve this problem?

 

Function: the void SystemInit_ExtMemCtl (void)
{
/ *! <FSMC Bank1 NOR/SRAM3 is used for the STM3210E-EVAL, if another Bank is
  required, then adjust the Register the Addresses * /

  / * <Enable the FSMC clock * /
  RCC-> AHBENR = 0x00000114;
 
  / *! <Enable GPIOD, GPIOE, GPIOF and GPIOG clocks * /
  RCC-> APB2ENR = 0x0000FFFF ;/ / 01E0; / / NE1 = PD7 NOE = PD4 NWE = PD5 NBL0 = PE0 NBL1 = PE1
 
/ * --------------- The SRAM the Data lines of the NOE and NWE configuration --------------- * /
/ * ---------------- SRAM Address lines configuration ------------------------- * /
/ * ---------------- NOE and NWE configuration ---------------------------- ---- * /
/ * ---------------- NE3 configuration ------------------------------ ---------- * /
/ * ---------------- NBL0, NBL1 configuration ---------------------------- ----- * /
 
  GPIOD-> CRL = 0xB4BB44BB;
  GPIOD-> CRH = 0xBBBBBBBB;

  GPIOE-> CRL = 0xBBBBBBBB;
  GPIOE-> CRH = 0xBBBBBBBB;

  GPIOF-> CRL = 0x44BBBBBB;
  GPIOF-> CRH = 0xBBBB4444;

  GPIOG-> CRL = 0x44BBBBBB;
  GPIOG-> CRH = 0x4BB44444;
  
/ * ---------------- FSMC Configuration ------------------------------ --------- * /
/ * ---------------- Enable FSMC Bank1_SRAM Bank ---------------------------- - * /
 
  FSMC_Bank1-> BTCR [4] = 0x00000000 ;/ / 0x00001011;
  FSMC_Bank1-> BTCR [5] = 0x00000004 ;/ / 0x00000200;
}

 

Outcomes