Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: -WE LPC 2294 won't go active low

2005-03-18 by douglasbolton

--- In lpc2000@yahoogroups.com, "Sveinung Waade" <sveinung@w...> 
wrote:
> Hello, 
> 
>  
> 
> Why does not the -WE for LPC2294 go active low together when the 
chips select 2 (CS2) turn active low ?
> 
> The PINSEL2.bit8 = 1 so the -WE signal should be activated.
> 
> I have also verified that p3.27 (-WE) goes three state when 
PINSEL2.bit8 = 0.
> 
> If I set BCFG2_bit.WP = 1 (write protection) the Test() function 
runs into a prefetch exception. 
> 
>  
> 
> void LPC2294InitExternMemory(void)
> 
> {
> 
>   /*
> 
>   // Octal Uart chip select.
> 
>   BCFG2_bit.IDCY = 3;     // 16.66nsec * (3+1) = 65 nsec.
> 
>   BCFG2_bit.WST1 = 15;    // 15 * 16.66nsec = 249nsec wait states 
for the UART
> 
>   BCFG2_bit.WST2 = 15;    // 15 * 16.66nsec = 249nsec wait states 
for the UART
> 
>   BCFG2_bit.RBLE = 0;     // 8 Bit access BLS3:0 high during access.
> 
>   //BCFG2_bit.BUSERR = ;  // Status bit 
> 
>   //BCFG2_bit.WPERR = ;   // Status bit 
> 
>   BCFG2_bit.WP = 0;       // Write protect off(0).
> 
>   BCFG2_bit.BM = 0;       // Burst rom bank off(0).
> 
>   BCFG2_bit.MW = 0;       // 8 bit(00) 16 bit(01) 32 bit(10) 
reserved(11)
> 
>   //BCFG2_bit.AT = ;      // Always zero
> 
>   */
> 
>   BCFG2 = 0x000079E3;
> 
> /*
> 
>   PINSEL2 = BIT2|         // JTAG port.
> 
>             BIT4|         // Data[0,15]
> 
>             BIT8|         // Enable WE
> 
>             BIT11|        // Enable CS1
> 
>             BIT14|        // Enable CS2
> 
>             BIT23|        // Enable address line A0
> 
>             BIT24|        // Enable address line A1
> 
>             BIT26;        // Enable address line A2-A5.
> 
>             */
> 
>   PINSEL2 = 0x05804914;
> 
> }
> 
>  
> 
> BYTE testArray[10];
> 
>  
> 
> void Test(void)
> 
> {
> 
>   BYTE *ptr;
> 
>   int i; 
> 
>   ptr = (BYTE *) 0x82000000;
> 
>   i = 9;
> 
>   while(i--) {
> 
>     *ptr = i; 
> 
>     i++;
> 
>     i--;
> 
>     testArray[i] = *(ptr++);
> 
>   }
> 
> }
> 
>  
> 
> You have any idée what is wrong?
> 
>  
> 
> Sveinung
> 
> 
> 
> [Non-text portions of this message have been removed]

Sveinung

I seem to remember that with an 8 bit bus the processor uses /BLS0 as 
it's write enable pin. I fell into the same trap!!!

regards

Doug

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.