> Not sure I follow what you are saying  "by pin" but I think it is because
> they use a development system that abstracts some details.   I know that I
> almost never use the low level registers to configure pins.  One reason is
> to keep my code portable if I move to a different ARM chip.

Problem is in hardware.

The selection mechanism is like this. For each pin GPIO or a peripheral is 
selected. If for same peripheral input more than one pin is configured there is 
a collision. If selection mechanism is on peripheral input this will never 
happen.


Method I prefer for pin initialization is to put in one place for all pins. By 
using this method it is simple to check against schematic. Since there is no 
pin initialization in software using peripheral there is no need to change then 
using other pin configuration. To select which peripheral software should a 
central macro is useful since resource allocation is put in a central place.



Software libraries and examples usually provided by manufacturers today is 
usually a litte bit of a maze to follow compared to the software I usually 
write. My software is simpler and would probably not work well in a dynamic 
environment but environment is usually static defined by hardware in the form 
of a circuit board so this is the first choice then possible.

To assign function calls statically in interrupt handler might be a little bit 
less portable but following execution path is very simple. A portable method to 
statically assign function calls at compile time would be really good. To 
clarify: static assignement is done by adding a function call in interrupt 
handler while dynamic method use a function pointer initialized at startup or 
changed at any time.


Nicklas Karlsson

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to