[En-Nut-Discussion] Multiple devices on the SPI BUS
Ole Reinhardt
ole.reinhardt at embedded-it.de
Sun Sep 28 13:44:50 CEST 2008
Hi all,
> I'm currently facing a similar problem with a SAM7X256.
> SPI flash on SPI0_NPCS2, MicroSD on SPI0_NPCS3
> Two VS1033 on SPI1_NPCS0/1/2/3.
> SPI1 works fine with my own code.
> The MicroSD card works fine as well with Nut/OS code.
> Now I want to use the flash on SPI0_NPCS2, but PHAT access can happen
> from other threads.
This problem will occur sooner or later on every bus you can use.
another example is e.g. I2C, RS485, USB...
Therefor we should develop a concept for automatic locking of those bus
devices.
Again let me bring up the linux example, where there is a dedicated
virtual driver structure for busses. So a bus device like SPI provides a
virtual bus structure, where a client device driver (MMC card, SPI-Flash
etc.) can connect to.
Every virtual bus provides abstract bus write / bus read functions as
well as connect / disconnect and power-management functions. These
functions are used by the client drivers to communicate with the client
chips and provide the necessary locking mechanisms.
I think the time is up to think about structuring NutOS a little more.
The discussion about NutOS initialisation is just the start, a better /
more abstract driver model would be the next.
What's the other contibutors / users opinion?
Regards,
Ole
--
_____________________________________________________________
| |
| 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