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

Ulrich Prinz uprinz2 at netscape.net
Mon Mar 30 01:26:25 CEST 2009


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



More information about the En-Nut-Discussion mailing list