ELMBio CANopen application for the ELMB ATmega128 processor ------------------------------------------------------------ RELEASE NOTES ============= V4.4.4 ----------------- (compiled with ICCAVR version V6.31A) Fixes: - can.c: bugfix: when updating the Nodeguard toggle bit in can_check_for_errors() after an automatic reply, must wait for the Nodeguard message to be sent, by checking the 'remote request pending' registers; added can_rtr_pending() function for that. toggle bit after an automatic reply in can_check_for_errs(), one must wait for the message to be sent by checking the 'remote request pending' registers, so added function can_rtr_pending() for that. - digio.c: bugfix in saving of configuration: block[6] = DigInIntrptMask2; should be: block[6] = DigInIntrptMask3; can also handle configuration as saved by version 4.3.3. - ELMBmain.c: Added spi_init() to startup code. - guarding.c: can also handle configuration as saved by version 4.3.3. New features: - Allow setting of Heartbeat time in milliseconds as well as seconds, although milliseconds are truncated to a multiple of 1000; if the requested setting is larger than 255 it is assumed to be in ms; note that settings between 256 and 999 get truncated to 0. - General-purpose SPI interface: can read/write any number of bits up to 32 in a single operation; SDI level when inactive is now configurable. V4.4.3 ----------------- (compiled with ICCAVR version V6.31A) Fixes: - adc_elmb.c: bugfix in adc_scan_next(): also check for TPDO3 transmission in progress. - Removed support for the old ELMB103 (with ATmega103 micro) from source code. V4.4.2 ----------------- (compiled with ICCAVR version V6.31A) New features: - Addition to general-purpose SPI: when writing bytes to SPI, data that simultaneously could be read from the output was not read and/or saved; now it is and it can be read from Object index 2600h, sub-index 5 (up to 4 bytes). V4.4.1 ----------------- (compiled with ICCAVR version V6.31A) New features: - (or bug fix?): Backwards compatible with ADC configuration as stored by V4.3.3, in order not to 'mess up' existing applications that stored their non-default ADC configuration. - 64 ADC input channels are divided into 4 groups of 16; each can have its own voltage range and unipolar/bipolar mode. - Remotely configurable Node Identifier (stored in onboard EEPROM), overruling the DIP-switch setting, enabling setting a (new) CAN-address without touching the ELMB. - All bits of all 3 I/O-ports (PORTA, PORTC and PORTF) can be defined as either input or output, allowing up to 24 inputs or 24 outputs. (NB: PORTF is 1st input port, but 3rd output port, PORTC is 3rd input port, but 1st output port, this is for reasons of compatibility with older versions) - Periodic integrity check of some important CAN-controller registers with comm settings: reinitialize CAN-controller if not as expected; this solves the problem of unexpected CAN-controller resets, associated with e.g. analog power interruptions (due to noise, voltage dips?); otherwise it is necessary to wait for a Lifeguarding time-out (if that has been enabled at all..). Fixes: - ELMBmain.c: Set mcucsr to 0 after it has been reported (otherwise it gets reported multiple times at every NMT Reset-Comm). - guarding.c: Make sure Nodeguarding does not work when Heartbeat is enabled (as defined by CANopen). - sdo.c: Storing parameters using a wrong signature did not result in an Abort Transfer SDO reply (although parameters were indeed not saved). Additions: - lmt.c/h files: with functions concerning NodeID configuration via CAN-bus. - objects.h : Objects 3300h and 3301h added for NodeID configuration. - adc_elmb.c : Subindices 22-25 and 26-29 added to Object 2100h (ADC config). - digio.c/h : Extensions to allow up to 24 inputs and outputs. V4.3.3 ----------------- (compiled with ICCAVR version V6.29) Release with fixes: - adc_elmb.c: reset+calib after an ADC time-out works only if first boolean 'AdcConvInProgress' is set to FALSE (bug introduced in v4.3.2) - can.c: - Initialize Emergency toggle bit globally, once, not in can_init(), to prevent bit not toggling in repeated can_init() calls. - Init error counter only when all is init'ed. V4.3.2 ----------------- (compiled with ICCAVR version V6.29) Release with fixes: - adc_elmb.c, cs5523.c: ADC conversion time-out set to 1200 ms (from 800), because there are sometimes conversions that last longer, so it appears. - adc_elmb.c: in PDO readout, after time-out do a complete reset and calibration sequence (instead of just a serial init). - guarding.h: enable Life Guarding by default, at 70 secs. V4.3.1 ----------------- (compiled with ICCAVR version V6.29) New features: - Exceed counter for ADC delta mode: report delta-change only when the change has been seen a consecutive number of times. - A toggle bit in the CANopen Emergency message (bit 7 of byte 7). - Some general-purpose SPI objects have been added to the Object Dictionary (SPI devices are to be connected to the ELMB in the same fashion as the ELMB-DAC, to connector J8 on the Motherboard). - The 'activate Bootloader' request (by SDO write) triggers an SDO reply before the actual jump from ELMBio to the Bootloader (an SDO should result in a reply at all times, to keep the host happy). Main changes specified per file: - 103conf.h : Changed version ID. - adc_elmb.c : - Bug fix in adc_window_check(). - Do a proper check on the value when setting the window scan counter (1<=value<=254). - Add an exceed counter for every channel in delta mode (report delta-change only when the change has been seen a consecutive number of times); use the minimum exceed count of the window mode. - can.c : Toggle bit 7 of byte 7 in every CANopen Emergency message sent. - objects.h : Added object indices for SPI access. - sdo.c : - Added objects for the general-purpose SPI. - Reply to the 'activate Bootloader' request, before actually jumping to the Bootloader. - spi_gp.c/h : Added files, containing functions for (general-purpose) SPI. V4.2.2 ----------------- (compiled with ICCAVR version V6.29) Release with fixes: - can.c: fixes a problem with the CAN-controller send-buffer refresh when a CAN-message is sent: if the Monitor-Mode buffer (where Remote Frames are received) is refreshed while a Remote Frame is received, it is lost. - max5122.c, max525.c and dac.c: moved final DAC_SET_SDI() from max5xx.c to dac_write() in dac.c to prevent a spikey SDI signal (although not harmful). V4.2.1 ----------------- (compiled with ICCAVR version V6.29) New features: - ADC window-mode now fully implemented, as well as storage and retrieval of the upper- and lower-limits, in EEPROM. - ADC and DAC serial signal 'opto delay' now configurable (distance between signal transitions now up to 255 us). - CAN message reception under interrupt and storage of messages in buffer in RAM (in/out indices stored using a majority-voting scheme for extra SEE protection). - Added some parameters for CAN controller: - possibility to disable software RTR handling (can put heavy load on microcontroller!); RTR disabled automatically when not required (depending on PDO configuration) - possibility to enable 'autostart': node automatically goes to Operational state at powerup/reset. - Added new object 100A, sub 1 containing a 'minor' version number string (here: "0001"). - DAC device type can be selected from MAX5122 (default) or MAX525. General: - Inverted logic of __ELMB128__ and __2313_SLAVE_ABSENT__ defines, so now called: __ELMB103__ and __2313_SLAVE_PRESENT__ - Changed all names with 'pdotx' to 'tpdo' and 'pdorx' to 'rpdo'. Main changes specified per file: - 103conf.h : CAN interrupt enable/disable definition added, changed version ID and new 'minor' version ID. - 81c91.h : Removed unused __LMB_TIMINGS__ part. - adc_avr.c : Select internal 2.56V ref (in ADMUX). - adc_elmb.c/h: Added upper/lower limit functions. - can.c/h : Message reception by interrupt function; messages are moved to intermediate buffer in RAM. Added functions for (SEE-tolerant) managing of message buffer. Configuration parameter datablock for CAN added to EEPROM. Remove EEPROM access from interrupt functions (otherwise need to disable CAN interrupt during EEPROM accesses and this can result in CAN messages lost, because EEPROM writes take a long time). Added can_write_bootup(), canopen_init_state(). Added can_rtr_enabled() to enable/disable RTR handling by microcontroller. Added functions to get and set new CAN config parameters. Added can_recv_descriptor_refresh(), called in can_read() and can_write() to refresh receiving buffers even when they are not used (to improve rad-tolerance). - cs5523.c : Add extra delay at end of cs5523_write_byte(), because it might be followed by a read-byte, which otherwise results in a clock pulse that is too short. - cs5523.h : Signal low/high width increased to 150 us. - dac.c/h : During operations select between 2 different DAC devices. - digio.c/h : Init/refresh PORTF and DDRF where necessary; pull-ups are now enabled for port F inputs. - ELMBmain.c : Adjust to accommodate CAN message buffer. Enable 'autostart' (automatically goto Operational at startup). Added human-readable version string + date to Flash. - intrpt.c : Added empty interrupt handlers for additional ATmega128 interrupt sources. - max5122.c/h : New files with functions for MAX5122-type DACs. - sdo.c : Added objects for upper/lower limits and CAN configuration. Tighter check on boolean objects: only 0 or 1 value allowed. - store.c/h : Added storing of CAN config parameter and upper/lower limits datablocks. - timer1.c : Added CanBusOffCnt decrement. V4.1 ----------------- (compiled with ICCAVR version V6.26(?)) New features: - Calibrated ADC readout (in microvolts) in all voltage ranges: calibration constants determined at production and stored in EEPROM; constants used at startup/reset to set ADC gain; constants can be re-stored if lost. - ADC readout-on-change in 'delta-mode', 'window-mode' or both; delta, window upper- and lower-limit can be set (and stored) per-channel; continuous loop (when in state Operational) may be interrupted by forced readout e.g. by a SYNC request. (NB: window-mode prepared (objects defined) but not implemented yet!). - ELMB Serial Number, stored in EEPROM; can be restored (rewritten) via CAN if lost/corrupted. General: - See below at v4.0. - Added __2313_SLAVE_ABSENT__ - Changed default ADC configuration. - Lifeguarding default off. - Device configuration read from EEPROM and initialization of working copies moved into xxx_load_config() function. Main changes specified per file: - 103conf.h : Version ID. - adc_elmb.c/h: Default range now 5V / unipolar (instead of 100 mV / bipolar) ADC error status bits for calibration constants, deltas, and upper- and lower-limits. New functions to deal with storing, retrieving and using calibration constants, deltas and limits and converting ADC counts to (micro)volts. Added readout-on-change ADC channel scan loop with global enable and separate delta- and window-check enable. Readout in (micro)volts, via Object or PDO3. Added subindices to ADC configuration object to read wordrate in Hz and voltage range in microvolts. - can.c/h : Defines for new PDO3 message (for analog inputs in microvolts). Added function can_transmitting(). - canopen.h : #included in can.h PDO configuration parameter 'event timer' now in seconds (instead of ms); can be set up to 65535 s. - crc.c/h : Added function crc16_eeprom(). Use __2313_SLAVE_ABSENT__ to remove unneeded code. - eeprom.c/h : Use eepromw_read() and eepromw_write() for addresses > 255. - iotest.c : Excluded pin PD3 from test because it is connected to the ADC chip-select; it means that pin PE3 is not tested at all; generalize code for PORTD/PORTE interconnections using some '#define's. - objects.h : Objects added: ELMB Serial Number, ADC readout-in-volts, ADC window-check/delta-check enable, ADC calibration constants, deltas and limits. - pdo.c/h : Added PDO3. Event timer now in seconds instead of ms; can be set up to 65535 s. - sdo.c : Many additions to Object Dictionary. - serialno.c/h: New files with functions dealing with the ELMB Serial Number. - store.h : define new storage space for ELMB Serial Number, calibration constants and analog input deltas and limits - timer0.c : New file: Timer0 used for general purpose time-outs on operations. - timer2.c : Timer2 now exclusively used to generate busy-wait delays, so removed interrupt handler. - watchdog.c : Use __2313_SLAVE_ABSENT__ to remove unneeded code. V4.0 for 128/103 ----------------- (compiled with ICCAVR version V6.25) New features: - Support for the Watchdog Timer (which could be 'on' at all times when the ATmega128's WDTON fuse is programmed !). - Changed Master-Slave monitoring mechanism, which is now done using only one I/O line, thus freeing up the I/O-line that is needed when the CAN-controller interrupt line is going to be used (in future software versions...). General: This version can be compiled for either a 103 / 128-in-103-mode processor or a 'native' ATmega128 processor (define __ELMB128__ for this). Support for a Slave processor is still present (but the Slave processor must run ELMBmon v2.0 or newer due to the new Master/Slave monitoring mechanism; see below). Main changes specified per file: - 103conf.h : Some pin name/function changes and version ID. - ELMBmain.c : Support for the Watchdog Timer: setting of the prescale and resets during the initialisation phase. Detection of the various types of reset that may occur and can be distinguished in the ATmega128 MCUCSR register. - can.c : Enable INT pin interrupt (for various events); functions can_check_for_msgs() and can_check_errors() now only check the INT pin for presence of new messages or other CAN-controller internal events. - crc.c : Assume that in an ATmega128 a Bootloader is present, which means that the flash CRC must be stored in a different location (just in front of the Bootloader code at word address 0xE000). - digio.c : PORTC in an ATmega128 is now bidirectional (in the ATmega103 only output). - sdo.c : Added function 'jump_to_bootloader()' which on an ATmega128 detects the presence of a Bootloader and jumps to it on request (a write access to Object 5E00). If on an ATmega128 a Bootloader is not present the function sends an Emergency message. - watchdog.c : Watchdog Timer support added (initialisation, configuration, regular resets in the 'watchdog()' function). Change in Master-Slave monitoring procedure. (see 'ELMBio background information' document for details). V3.6 ----------------- (compiled with ICCAVR version V6.25) - General: - Anti-SEE handling of global Boolean variables. - Analog output: - There was a bug in setting DAC outputs: fixed. - Data-Direction Register setting refresh (SEE protection). - Analog input: - Refresh of Channel-Setup Registers (CSR) and Data-Direction Register setting (SEE protection). - If an ADC scan is aborted in the middle (e.g. due to an NMT message) it is important to properly finish the ongoing conversion (or else the ADC might get into a strange configuration (unexplained...)). Main changes specified per file: - 103conf.h : Version ID. - adc_elmb.c/h: Added adc_init_confreg(), adc_init_csr() and adc_serial_init(); added refresh of Data-Direction Register settings and CSRs at every start of scan (Config Reg already refreshed) as a form of SEE protection. Global BOOLs are explicitly checked for value 1 (TRUE), also as a form of SEE protection. In adc_pdo_scan_stop() finish an ongoing conversion in the usual fashion, to prevent ADC (config) corruption. - dac.c : Added refresh of Data-Direction Register settings before every DAC write operation as extra SEE protection. Increased number of channels to 64 (4*16); was 16. Bug fix: in max525_write_dac(), incorrect bitmasking operation, resulting in wrong setting in DAC. - sdo.c : Added call to 'adc_serial_init()' after I/O-test (the ADC serial interface is out-of-sync after the test, if the I/O pins for the ADC interface overlap the I/O-pins in the test). Bug fix in one of the compile option bits (Object 5C00). - watchdog.c : Global BOOL 'KickWatchDog' is explicitly checked for value 1 (TRUE), as SEE protection. V3.5 ----------------- (compiled with ICCAVR version V6.24A) - General: - no major changes, some bugfixes and changes to reduce power consumption - type definition WORD changed to UINT16 and ULONG to UINT32 - Digital I/O: - default digital outputs setting changed from LOW to HIGH. Main changes specified per file: - 103conf.h : Version ID. - adc_elmb.c : Bug fix: don't start ADC channel scan when AdcChans is 0. Bug fix: (did not cause problems): ADC MUX signal must be a low pulse, not a high pulse; idle level high is also better: opto-coupler LED is off -> less current consumption. Keep SDI high when idle:opto-coupler LED is off -> ca. 1 mA less current consumption when idle. - cs5523.c : In byte-write functions: keep SDI high when idle: opto-coupler LED is off -> ca. 1 mA less current consumption when idle. - cs5523.h : Bug fix: CS5523 ADC Power Save bit was defined incorrectly: 0x08 instead of 0x02. - dac.c/max525.c: Keep SDI high when idle-> less current consumption when idle. - digio.c : digital outputs set HIGH, by default (if no EEPROM setting), was LOW (contrary to documentation). - general.h : type definition WORD changed to UINT16 and ULONG to UINT32. V3.4 ----------------- (compiled with ICCAVR version V6.24A) - ADC readout: optimisation of (slow) serial communication with ADC: single ADC channel readout overhead decreased from 22 ms to 12 ms. - CAN: CAN-controller message-descriptor refresh (switched on by a compiler option), to improve SEE tolerance. - Master-Slave monitoring: no longer a timer-interrupt task, but a task performed in the main application loop (although still timer-triggered); (main loop can get corrupted (SEE) while monitoring task was still running fine in the foreground). - Heartbeat: always available; no longer only available with compile option; now possible to set the Heartbeat rate from 1 to 255 s (=0 means Heartbeat disabled). - Code in general: use #define's for message lengths, not hardcoded values; rename type 'BOOLEAN' to 'BOOL'. Main changes specified per file: - 103conf.h : Version ID. - adc_elmb.c : always refresh the Configuration Register before each scan; change in adc_init() concerning the initialization when compile option __ALL_MOTHERBOARDS__ is used; minor bug fix concerning resetting variable 'AdcError' after an ADC reset/calibrate. - adc_elmb.h : some simplification in naming SPI-to-I/O-pin mapping. - can.c : added optional (compile option) CAN message descriptor refresh (after each CAN buffer read, before each CAN buffer write); when writing Emergencies make sure not to overwrite the previous one in the CAN-controller (wait with time-out). - cs5523.h : replaced 2 functions by macros. - dac.c : changes to match the DAC-module under development. - dac.h : selection pins matching the DAC-module under development. - digio.c : bug fix: initialisation of second digital output Port; by default digital input interrupts disabled. - ELMBmain.c : explicit call to master-slave monitor function added; try to recover from bitflips in 'node_state' variable. - general.h : renamed BOOLEAN to BOOL. - guarding.c/h: added function 'guarding_set_heartbeattime()'; heartbeat time in s instead of ms (which is actually against CANopen...). - max525.c/h : added (matching the DAC-module under development). - pdo.c/h : now use descriptive names (#defines) for the different PDOs. - sdo.c : now possible to set heartbeat period (up to 255 s). - spi.c : replace function 'spi_clk()' by macro. - store.c : use a BYTE instead of a WORD to address EEPROM for reasons of speed (so limited to maximum address 255!) - store.h : don't use EEPROM address 0 (start from 1). - timer1.c : removed master-slave monitoring from interrupt routine. - timer2.c : in timer2_delay_mus() take function call overhead into account. - watchdog.c/h: added, contains master-slave monitor function previously in timer1.c. V3.3 ----------------- (compiled with ICCAVR version V6.22) General: - Optional variable storage in EEPROM ('EEPROM as RAM') extended to all long-lived globals (including PDO parameters, Digital I/O parameters) - Some missing #include's fixed. - ELMBmain.c - Moved initialisation of Digital I/O and DAC to before ADC. - Check for type of reset: hard or soft. - Refresh system part of PORTD/DDRD/PORTE/DDRE registers but only when operational --> reprogram Slave processor only when Master NOT operational. - adc_elmb.c - Optionally perform a complete reset and calibration procedure before each scan (this includes a refresh of the Configuration Register), controllable via Object 0x2120. - adc.h, adc_elmb.c, adc_avr.c - removed unused 'adc_no' parameter from some functions. - can.c - When going into bus-off state, do not attempt to connect again immediately but idle for a short period (200 ms). - crc.c - Fixed bug in CRC-ing application code with a size > 64kbytes. - digio.c, digio.h - 2nd output port now shared with a 2nd input port (Object 0x6208). - interrupt masks for the input ports (Object 0x6006). - initialize outputs to either low or high, controllable via Object 0x2300; outputs initialized after hard reset (power-up, watchdog) only (not via NMT Reset-Node message). - removed storing/restoring digital output settings in EEPROM (added in v3.2). - eeprom.c, eeprom.h - go from WORD to BYTE addresses in functions to improve efficiency, since 256 bytes of storage is sufficient for the time being. - sdo.c - Added several Objects for ADC and Digital I/O settings. - Added 'Test' Object 0x5DFF. - Added Object 0x5C00: a bitmask showing the compile options used. - store.c, store.h - rearrangement of storage: smaller blocks of configuration settings, more variables in EEPROM (as RAM backup); everything not exceeding address 255 (see eeprom.c). V3.2 ----------------- (compiled with ICCAVR version V6.21C) - Go to Motherboard V3 configuration (main difference is: different I/O lines used for the ELMB's ADC), but allow backwards compatibility using compile options __MOTHERBOARD1__ (use old Motherboards) or __ALL_MOTHERBOARDS__ (use any of the Motherboard versions); so the default is Motherboard V3; Defining __ALL_MOTHERBOARDS__ results in about 1 kByte more code. - In relation to the change to Motherboard V3: all ADC dependent I/O pin configurations have been moved from 103conf.h to adc_elmb.h. - All code and files concerning read-out of LMB or MDT ADCs have been removed from this release (they are either obsolete or not useful to the average user/developer): adc_lmb.c, adc_lmb.h, adc_mdt.c, adc_mdt.h, cs5525.c, cs5525.h. - adc_elmb.c - Refresh the Configuration Register before each scan (in adc_pdo_scan_start()). - crc.c - Implement CRC over program code > 64 Kbytes using crc16_code_from_64k(). - digio.c - Refresh DDR register before setting new output levels. - Add code to store digital output port settings in EEPROM, enabling restoring the settings at reset and power-up. - ELMBmain.c - Moved calculation of program-code CRC up a few lines... - guarding.c, sdo.c, objects.h - Reading heartbeat time from SDO now possible. - iotest.c, iotest.c (objects.h, sdo.c) - New files - To be able to use define compile option __INCLUDE_TESTS__ - Used to test Motherboard and ELMB I/O lines (not the ADC) - Does tests on the available I/O lines, assuming they are interconnected in the following way: PORTA 0 to 3 connected to PORTA 4 to 7, PORTD 3 to 7 connected to PORTE 3 to 7, PORTC 0 to 7 connected to PORTF 0 to 7. - the tests: - all possible output values of PORTA(0-3), PORTD(3-7) and PORTC, per port, using PORTA(4-7), PORTE(3-7) and PORTF as inputs. - all possible output values of PORTA(4-7) and PORTE(3-7), per port, using PORTA(0-3) and PORTD(3-7) as inputs. - a walking-1 and a walking-0 on the combined ports (the walking-1/0 'runs' from PORTA to PORTD to PORTC; checks are on PORTA(4-7), PORTE(3-7) and PORTF). - the test is triggered by reading CANopen Object 5FFF, subindex 1: - the returned 32-bit value contains 4 bytes with errorbits per port: Byte 0: PORTA, Byte 1: PORTD, Byte 2: PORTE, Byte 3: PORTF A bit that is set means the corresponding I/O line of the corresponding Port has at least once been _read_ incorrectly during the tests. (PORTC has no errorbits because it is never 'read', but of course the fault -if there is any- shown in the errorbits of PORTF could still be located at the PORTC connector!). - total test time is in the order of 300 ms. (using a signal settling time of 1 ms). - objects.h - Add defines for Manufacturer field error codes; used in practically every file that calls 'can_write_emergency()'. - store.h: - Defines for EEPROM variable storage: variables that do not change very often are stored in EEPROM after initialisation and read from there whenever used; it is assumed this makes the software more radiation-tolerant Use compile option __VARS_IN_EEPROM__ to make it part of the application; used in: adc_elmb.c, can.c, dac.c and guarding.c. V3.1 ----------------- (compiled with ICCAVR version V6.19A) - Addition of analog outputs (dac.c, dac.h), dummy for the time being (i.e. without specific hardware support),and an appropriate PDO (RPDO2) All necessary entries in the Object Dictionary for the DACs and the PDO have been added as well. - I/O-line configurations have been moved from 103conf.h to their corresponding device module include file (e.g. digio.h, adc_elmb.h, etc.). - Addition of support for different ADC configurations but maintaining an identical API, through compile options; e.g. includes support for the on-chip ATmega103 8-chan 10-bit ADC (using compile option __ADC_AVR__). - Digital I/O TPDO automatic transmission on change-of-state can now be switched off (Object 6005: global digital input interrupt enable). - Heartbeat (to be enable using compile option __HEARTBEAT__) period has its own period counter; at the moment it is not configurable: it has a default value of 30 s. V2.2 ----------------- (compiled with ICCAVR version V6.19A) - cs5523.c: - BUG FIX: in cs5523_reset() used Timer2 twice at the same time, in a timeout and for reading out the CS5523 registers, resulting in a faulty timeout causing a hang situation (e.g. when CS5523 not present). V2.1 ----------------- (compiled with ICCAVR version V6.19A) - Increased hardware stack size from 16 to 32 (was really too small: function call depth about 8, not including interrupts...). V2.0 ----------------- (compiled with ICCAVR version V6.17E) - Increased hardware stack size from 16 to 32 (was really too small: function call depth about 8, not including interrupts...). - Storage of parameters in EEPROM (plus CRC) on a datablock basis: PDO comm parameters, Guarding stuff, ADC config, Dig I/O config: store.c, store.h plus additional routines in device software modules - CRC over program code in FLASH (Master as well as Slave): crc.c, crc.h - optional Heartbeat protocol (via compile option) - ELMBmain.c: renamed from LMBma.c - 103conf.h: - moved Dig.I/O port mappings from digio.h to here - adc.c: - properly halt ADC conversion: adc_pdo_scan_stop() - can.h: - moved 81C91 specific constants to its own include file: 81c91.h. - need for different bit timings due to inaccurate ELMB ceramic clock crystals - define const array for object descriptor settings to ease later additions of messages to receive - can.c: - baudrate 1000 kbit/s setting replaced by 500 kbit/s. - can_check_errors(): check for CAN errors and try to go back on-line - dwnld23.c: - stop/restart Slave monitoring - slight change in reset-pulse generation - enable ISP_END_OF_PROGRAMMING (to be used by CRC check on Slave FLASH) - pdo.c: - mapping parameters are stored in FLASH (defined as 'const') - add 'pdo_on_nmt()' to enable calling of 'adc_pdo_scan_stop()', and reinit timer counters. - sdo.c: - storage of parameters (OD 1010) and resetting to defaults (OD 1011). V1.1 ----------------- - general.h: - Added some defines for 'asm()'. - LMBma.c - Bug fix concerning switching off Analog Comparator (used bitnumber (8) instead of the bitmask (0x80)) - sdo.c: - Added object handling for digital-in (0x6000), digital-out (0x6200) and ADC-configuration (0x2100). - timer1.c, 103conf.h: - Inter-processor monitoring signals inverted: go from high-to-low-to-high