Forum: Mikrocontroller und Digitale Elektronik STM32F2xx FSMC mit Epson S1D13517: Config Problem


von pJs (Gast)


Lesenswert?

Hallo zusammen,
ich bin noch relativ unbewandert im Umgang mit dem FSMC des STM32F2xx 
und habe deshalb ein kleines Problem mit dessen Konfiguration. Hier mal 
die Eckdaten der Verkabelung:

Der S1D13517 ist mit 16bit Breite verbunden D0..15
#HWE ist an FSMC_NWE
#HRE ist an FSMC_NOE
#HC/S ist an FSMC_NE1
#HD/C ist an A16
#HALE ist auf GND
#RESET ist steuerbar
Damit ist das ganze Host-Interface angeschlossen, mehr gibts nicht.

Hier meine FSMC Einstellungen (GPIO's sind als Alternate Function 
initialisiert):

  RCC_AHB3PeriphClockCmd(RCC_AHB3Periph_FSMC, ENABLE);

  FSMC_NORSRAMDeInit(FSMC_Bank1_NORSRAM1);
  FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct  = &p_read;
  FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct      = &p_write;
  FSMC_NORSRAMStructInit(&FSMC_NORSRAMInitStructure);

   /*-- FSMC Configuration 
------------------------------------------------------*/
  p_write.FSMC_AddressSetupTime = 0x1;
  p_write.FSMC_AddressHoldTime = 0x5;
  p_write.FSMC_DataSetupTime = 0xA;
  p_write.FSMC_AccessMode = FSMC_AccessMode_A;

  p_read.FSMC_AddressSetupTime = 0x1;
  p_read.FSMC_AddressHoldTime = 0x5;
  p_read.FSMC_DataSetupTime = 0xA;
  p_read.FSMC_AccessMode = FSMC_AccessMode_A;

  FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM1;
  FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = 
FSMC_DataAddressMux_Enable;
  FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_SRAM;
  FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = 
FSMC_MemoryDataWidth_16b;
  FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = 
FSMC_BurstAccessMode_Disable;
  FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = 
FSMC_WaitSignalPolarity_Low;
  FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable;
  FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = 
FSMC_WaitSignalActive_BeforeWaitState;
  FSMC_NORSRAMInitStructure.FSMC_WriteOperation = 
FSMC_WriteOperation_Enable;
  FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable;
  FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = 
FSMC_ExtendedMode_Disable;
  FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable;
  FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct  = &p_read;
  FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct      = &p_write;

  FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure);

  FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM1, ENABLE);

Jetzt hätte ich versucht an Register 0 die Product ID zu lesen um zu 
sehen ob Kommunikation zustande kommt, lese aber immer nur 0.

Ich lese an der Adresse: 0x60000000
Ist das die richtige? Und welche Adresse müsste ich später für die Daten 
nehmen? Da ich A16 benutze 0x60020000 oder?
Hab ich das richtig gelesen, dass in diesem Modus die Registeradressen 
um 1 nach rechts geshiftet sind?

Steh grade ein bißchen auf dem Schlauch oO.

mfG,
pJs

von pJs (Gast)


Lesenswert?

Keiner ne Idee? ;(

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.