AVR32: SDRAM und LCD

OP #2009686
Lesenswert?

Hallo,

ich versuche an einen UC3A0512 ein memory mapped LCD zu betreiben.
Am EBI wird ein SDRAM über /CS1 angesteuert.
Das Display liegt an /CS3.

Problem:
Schreibe ich nun auf das LCD, werden /WR und /CS3 richtig generiert,
/CS1 bleibt bei diesem Zugriff aber weitehin aktiv.

Hat jemand Erfahrung mit dem gleichzeitigen Benutzen von SDRAM und SRAM 
am UC3?
OP #2245215
Lesenswert?

Nun,
ich bin mit meinem Problem auch bei den Kollegen von Atmel vorstellig 
geworden:

Hello,
I do not use /NC1 for address decoding.
NCS1 is connected directly to the SDRAM and
NSC3 is connected directly to the LCD.
My expection is that if I make an access to the LCD (in this moment NCS3 
is low) the signal NCS1 have to be high(inaktiv)
so that the possibilty of a bus collision is avoid.


Die Anwort war:
Dear Customer,
Yes, when LCD is used, NCS1 should be held high to avoid bus collision. 
It can be done by changing its function to a GPIO.

@Jens A.:
kannst du mir die Konfiguration verraten mit der du das geschafft hast?
#2245638
Lesenswert?

Hallo,

sorry ich habe cs0 natürlich genommen nicht cs3. Muss aber genauso 
funktionieren. Wie sollten denn deiner Keineung nach die CS Signale 
sein.
Also meiner meinung und so sind sie auch geht CS low wenn auf das Device 
zugegriffen wird. Ansonsten HIGH. So ist nun mal ein EBi definiert.
Achso die SDRAM config habe ich doch aus dem Framework.
1
unsigned char holewritecycle=15;
2

3
  // start config ebi for adresses on cs0
4

5
  AVR32_GPIO.port[0].pmr1|=(1<<14); // enable PA14 function c this is cs0
6

7
  AVR32_SMC.cs[0].CYCLE.nrd_cycle=holewritecycle;
8
  AVR32_SMC.cs[0].CYCLE.nwe_cycle=holewritecycle;  // set hole write cycle to
9

10
  AVR32_SMC.cs[0].SETUP.ncs_rd_setup=0;
11
  AVR32_SMC.cs[0].SETUP.ncs_wr_setup=0;    // set cs write setup time to 0
12

13
  AVR32_SMC.cs[0].SETUP.nrd_setup=1;
14
  AVR32_SMC.cs[0].SETUP.nwe_setup=1;    // set we write setup time to 0
15

16

17
  AVR32_SMC.cs[0].PULSE.ncs_rd_pulse=holewritecycle+1;
18
  AVR32_SMC.cs[0].PULSE.ncs_wr_pulse=holewritecycle+1;
19
  AVR32_SMC.cs[0].PULSE.nrd_pulse=8; //nrd-read
20
  AVR32_SMC.cs[0].PULSE.nwe_pulse=8; //nwe-write enable
21

22
  AVR32_SMC.cs[0].MODE.bat=0; //Byte Access Type 0=Byte select access type, 1=Byte write access type
23
  AVR32_SMC.cs[0].MODE.dbw=1; // data buth width 0= 8 bit 1= 16 bit 2 = 32 bit
24
  AVR32_SMC.cs[0].MODE.exnw_mode=0; //nwait mode
25
  AVR32_SMC.cs[0].MODE.pmen=0;
26
  AVR32_SMC.cs[0].MODE.ps=2; //Page Size 0=4-byte Page, 1=8-byte Page, 2=16-byte Page, 3=32-byte Page
27
  AVR32_SMC.cs[0].MODE.read_mode=1;
28
  AVR32_SMC.cs[0].MODE.tdf_cycles=0;
29
  AVR32_SMC.cs[0].MODE.tdf_mode=0;
30
  AVR32_SMC.cs[0].MODE.write_mode=0;

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren