[En-Nut-Discussion] Misterious Buffer init

Harald Kipp harald.kipp at egnite.de
Fri Nov 14 21:44:45 CET 2008


Wiegelmann wrote:
> With the new ethernut beta 4.7.4.0 on eir the spi flash doesn't work anymore. 

Strange, indeed. However, after experiencing the same problem I changed 
the following.

1. Adding the SPI IRQ Handler for the SAM7SE config.

--- nut/conf/arch/arm.nut       Thu Oct 23 08:51:22 2008
***************
*** 542,548 ****
               "arm/dev/ih_at91irq1.c",
               "arm/dev/ih_at91irq2.c",
               "arm/dev/ih_at91pio.c",
+             "arm/dev/ih_at91spi0.c",
               "arm/dev/ih_at91ssc.c",
               "arm/dev/ih_at91swirq.c",
               "arm/dev/ih_at91tc0.c",

2. Added the SAM7SE to the DataFlash Init.

--- nut/dev/at45db.c    Mon Aug 11 06:59:41 2008
***************
*** 360,366 ****
           return -1;
       }

! #if defined(MCU_AT91SAM7X) || defined(MCU_AT91SAM7SE) || 
defined(MCU_AT91SAM9260) || defined(MCU_AT91SAM9XE)
       At91SpiInit(spibas);
       At91SpiReset(spibas);
       At91SpiInitChipSelects(spibas, _BV(spipcs));
--- 360,366 ----
           return -1;
       }

! #if defined(MCU_AT91SAM7X256) || defined(MCU_AT91SAM9260) || 
defined(MCU_AT91SAM9XE512)
       At91SpiInit(spibas);
       At91SpiReset(spibas);
       At91SpiInitChipSelects(spibas, _BV(spipcs));

This works here. I really need to create a new package.

Harald




More information about the En-Nut-Discussion mailing list