[En-Nut-Discussion] SJA1000

Ole Reinhardt ole.reinhardt at embedded-it.de
Thu Aug 30 13:17:05 CEST 2007


Hi Hendrik,

> I also suggest to add:
> 
> #include <cfg/arch/avr.h>
> 
> Then the driver will acknowledge the interrupt settings made with nutconf
> (Would be nice if the base address could be set as well, as potential
> example programs then would run with any hardware rather than the fixed base
> address).

Good Idea! I will do so and test it soon.

The base address can be passed as second parameter to NutRegisterDevice.
So it is configurable for every application. I better would like to use
this mechanism in more drivers than configuring this by defines /
nutconf. In this way you don't have to configure that much in the
configurator and can use the same build tree for different applications.

In this context I would vote for a new device registration framework
where you can pass the base address as well as the used interrupt and
other parameters to make the device code working better for different
platforms.

> In addition I saw that conf/arch/avr.nut mentions IRQ7 as default for the
> SJA1000 driver but it is in fact 4.

Ok, I'll change this to 7.

> I currently don't have a hardware at hand, otherwise I would have done the
> changes myself and tested them before committing them back.
> 
> I also have a candemo.c which compiles for the AT90CAN128 or SJA1000
> depending on the CPU which I can send you to test and comit.

Sorry, I don't have a AT90CAN128 hardware any more, but I'd like to test
your code on my SJA1000 hardware.

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