26 Commits
Author SHA1 Message Date
Federico Cerutti 247a0ffd55 Faster ISR sharing in ASM
While in the process of writing a new codec I stumbled upon the long
standing issue of ISR sharing in AVR MCUs.
Actually this is accomplished with an ISR written in C, which simply
calls another plain C function referenced via a function pointer
updated at runtime.
This approach is slow because GCC can't optimize the ISR, since it
does not know which registers will be used, so it defaults to push/pop
all of them.

My solution keeps the concept of pointers to functions, but greatly
improves speed by reducing the ISR itself to the bare minimum to call
another function, which will be compiled by GCC as a signal.
This means all interrupt optimizations will be put in place by GCC,
while ISRs can be still written in plain C code, but the overhead is
now much smaller. It has proven to reduce by 20 the number of
instructions for every ISR, mainly pushes/pops, which cuts the clock
cycle count down by 30 cycles (1 cycle for every push, 2 for pop).
In time units, this means 1.1 uSec are saved for every ISR invocation
and every shared ISR now takes only 13 clock cycles more than the
"bare" one.

A new ISR_SHARED function type has been defined in Common.h to hide
away from the programmer GCC attributes. All new shared interrupt
handling routines should be defined of this type to prevent
stack and registers corruption.

Minor changes were made to Codec.h to allow including it in .S files.
2019-12-08 14:11:05 +01:00
Fabian a35610f6a7 run make style #237 2019-11-15 10:21:40 +01:00
Philippe Teuwen bece629f9c make style proposition 2019-11-07 12:36:34 +01:00
slaenger 4923dc9322 Added triple DES Implementation (from dev-zzo's DESFire branch). 2019-09-17 10:48:44 +02:00
Lava Git 0fdc1b43ce Add Mifare Mini support 2019-08-16 14:27:48 +01:00
MrMoDDoM b28d8cb337 EM4233 first draft 2018-12-10 19:43:43 +01:00
Federico CeruttiandThorsten Bosbach 429f541eab Porting Rickventura changes to the main repo 2018-11-10 09:42:49 +01:00
ThorstenandGitHub 3484ce8288 Merge branch 'master' into ISO15693_base 2018-10-17 00:29:09 +02:00
georgandThorsten Bosbach 60607f37a8 added vdwels changes 2018-08-17 21:12:49 +02:00
georgandThorsten Bosbach b1f0da0c33 added ISO15693 codec 2018-08-17 21:05:17 +02:00
chenzitai 823602c721 Add Framework for autocalibrate of Sniffing Mode
(cherry picked from commit c8606be)
2018-08-15 22:49:02 +01:00
chenzitai fd57c63ba8 Work in Card->Reader direction only, WIP
(cherry picked from commit 9ce138c)
2018-08-15 22:44:41 +01:00
Georg be67058675 added function for storing single setting data to eeprom, added reader threshold being stored in eeprom 2018-01-24 15:38:10 +01:00
Georg a5d0a8d216 reader codec upgrade 2018-01-22 08:47:59 +01:00
Georg d4ae2f2060 changed standard timeout so autocalibrate can run flawless 2017-07-12 10:56:56 +02:00
Philippe Teuwen b95d3f2158 Add option to fix manufacturer byte on UID_LEFT_(DE/IN)CREMENT on 7-byte UID 2016-10-29 22:37:29 +02:00
Philippe Teuwen e000833a3c Add makefile target to program directly the latest official firmware 2016-10-26 10:43:15 +02:00
dev_zzo f245b0ed2e fix build on Windows #3 2016-10-24 15:24:37 +02:00
dev_zzo 0ce5a6682b fix build on Windows #2 2016-10-17 12:20:48 +02:00
dev_zzo cf9d56dcc5 fix build on Windows 2016-10-17 11:50:22 +02:00
Georg f46f5b4fbf update to RevG 2016-10-07 23:44:50 +02:00
Georg 5ac1cc7ed7 moved discontinued RevE files to own directory 2016-10-07 18:18:13 +02:00
Timo Kasper 49b2a19364 Major improvements (amongst others Mifare Ultralight and 7-Byte UID MF Plus support) and major bug fixes. Thanks to Simon Küppers and Julius Schmalz. 2015-03-04 01:28:25 +08:00
Simon Küppers 810fdeeded Corrected Typo in Makefile.
Thanks to Yves Fischer <yvesf-git@xapek.org>
2014-10-31 15:41:53 +01:00
Simon Küppers 61ba84148c Modified makefile to use unix sh in order to build files 2014-04-05 17:58:39 +02:00