[En-Nut-Discussion] Accessing device via NCS7 on EIR1.0

Ulrich Prinz uprinz2 at netscape.net
Sun Apr 5 01:15:12 CEST 2009


Nobody had an idea... So I had to bash that my self.

The DM9000E does something to the ARM setup. I don't know what, but its 
init renders all previous setups in the NCS and GPIO/Special function 
selects useless. The only way to attach forther deices to the external 
bus is, to setup the GPIOs and NCSx after the DmInit had been called.

I'll investigate that a bit deeper after I have my first characters 
scrolling through the display. For now it's only showing some clear blue 
background and some coloured lines.

CUL8R

Ulrich

Ulrich Prinz wrote:
> Hi!
> 
> Doesn't anybody have any idea, why I can't initialze NCS7?
> In the meanwhile I searched for the DM9000 code in nutos, where I copied 
> the NCS config from. Unfortunately this DmInit isn't called anywhere. So 
> I assume that the ethernet Interface is inited somewhere else. But there 
> is also no further reference to any kind of NCS besides in 
> crtat91_rom.S. Here some init is done that includes programming of the 
> several NCSx Outputs of the chip.
> Unfortunately this file is not mentioned in any other file elsewhere.
> 
> So again I am stuck.
> 
> Any idea?
> 
> Best regards
> Ulrich
> 
> 
> Ulrich Prinz wrote:
>> Hi!
>>
>> Trying to attache a display to my Elektor Internet Radio 1.0...
>> I use NCS7, DB0..DB8 and NWE/NRD, but I am failing at all. I initialize 
>> the NCS7 like this
>>
>>     /* Init PIOC Pin20 as NCS7
>>      */
>>
>> #if 0
>>      GpioPinSetHigh(NUTGPIO_PORTC, 20);
>>      GpioPinConfigSet(NUTGPIO_PORTC, 20,
>>        GPIO_CFG_PULLUP|GPIO_CFG_DISABLED|GPIO_CFG_PERIPHERAL1);     #else
>>      outr(PIOC_PUER, _BV(PC20_NCS7_B)); // Enable PullUp on NCS7
>>      outr(PIOC_PDR, _BV(PC20_NCS7_B));   // Disconnect from PIO
>>      outr(PIOC_BSR, _BV(PC20_NCS7_B));   // Select Function B
>> #endif
>>      outr(SMC_CSR(7)
>>          , (10 << SMC_NWS_LSB)
>>          | SMC_WSEN
>>          | (2 << SMC_TDF_LSB)
>>          | SMC_BAT
>>          | SMC_DBW_16
>>          | (2 << SMC_RWSETUP_LSB)
>>          | (2 << SMC_RWHOLD_LSB)
>>          );
>>
>>     /* set display power and oscillator */
>>     gxdisp_cmdw(0x06,0x01); // display off, normal current
>>     gxdisp_cmdw(0x05,0x01); // set soft reset
>>     NutSleep(1);
>>     gxdisp_cmdw(0x05,0x00); // end soft reset
>>     gxdisp_cmdw(0x04,0x01); // reduced current
>>
>> Using a Scope I can see that the data (0x06 0x01 0x05 0x01...) is 
>> written to the bus, but address lines don't change and control lines 
>> like NWE and NCS7 are not active.
>> The initialization is copied from DM9000 interface, where it seems to 
>> work pretty fine, if I listen to what comes out of the headphones :)
>>
>> Is there a limitation when or where I can initialize NSCx while running 
>> ethernut 4.9.x system? I read a lot around in the AT91SAM7SE manuals and 
>> saw some parts about protection of memories and IOs. Is there something 
>> activein that manor? Crawling some code I didn't find any of the 
>> possible protection registers defined. So if they don't exist, I expect 
>> nutos not to use them and close me out.
>>
>> Any idea?
>>
>> Regards, Ulrich
>> _______________________________________________
>> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion



More information about the En-Nut-Discussion mailing list