[En-Nut-Discussion] help with NUT/OS 4.2.1

Ole Reinhardt ole.reinhardt at embedded-it.de
Tue Jul 24 12:00:09 CEST 2007


Hi!

sorry for my late answer, I attended a conference last week.

> Well, I want to have Nut/OS on an ATMEGA128 which interfaces to
> an AT45DB041B DataFlash. Nut/Os has a device driver for this DataFlash
> but it´s been currently tested only for AT91 uC's .
> I have written some C source codes for handling SPI communication and AT45DB041B 
> writing/reading/erasing.
> How can I integrate it to NUT/OS ?

If you look into nut/dev/at45db.c you will find a reference to the At91
SPI functions.

What is needed to make it running on an AVR should not be that much of a
problem but will be a lot of work.

SPI access should be made more abstract and not platform dependant.
First you should write a more general SPI device like the one for the
AT91. See nut/arch/arm/st91_spi.c

Based on this device one could write a header with wrappen macros to
access the SPI functions for both architectures using the same API
calls.

If you have written a more general avr spi device you should also change
the existing avr spi flash driver and spi digiio driver to use the basic
spi driver as well.

Hope this will help a little. If you have more specific questions, dont
hesitate to ask.

> and good luck with your own business

Thanks!

Bye,

Ole Reinhardt

-- 
 _____________________________________________________________
|                                                             |
| Embedded-IT          Hard- und Softwarelösungen             |
|                                                             |
| Ole Reinhardt        Tel. / Fax:        +49 (0)271  7420433 |
| Luisenstraße 29      Mobil:             +49 (0)177  7420433 |
| 57076 Siegen         eMail:    ole.reinhardt at embedded-it.de |
| Germany              Web:         http://www.embedded-it.de |
|                      UstID / VAT:       DE198944716         |
|_____________________________________________________________|




More information about the En-Nut-Discussion mailing list