Michal Horn [Thu, 15 Aug 2013 15:51:35 +0000 (17:51 +0200)]
Code cleanup
Old functions from fray.c file used in fr_tms570.c file were moved into fr_tms570.c and renamed
Old unused functions from fray.c file were deleted.
Macros from fray.h file moved into fr_tms570.h file.
Unused macros from ti_drv_fr.h deleted
Comments tuned
Some variables and functions redefined as static.
Michal Horn [Wed, 14 Aug 2013 10:36:57 +0000 (12:36 +0200)]
Bug in HOUT pin configuration.
Inputs and outputs were swapped for all HOUT pins except HOUT5 pin.
All HOUT pins were configured as pull-up, which is wrong. No all the pins are pull-down.
Michal Sojka [Tue, 13 Aug 2013 20:54:33 +0000 (22:54 +0200)]
Temporary fix of missing EMAC interrupt handlers
EMAC IRQ handlers were moved recently from the library to the test
software. When the library is used in different projects, such as
in Simulink generated apps, linking fails because the interrupt handlers
are missing.
Comment them temporarily out until Jan Dolezal integrates his Ethernet work
into the master branch.
Michal Sojka [Tue, 13 Aug 2013 20:46:19 +0000 (22:46 +0200)]
Remove pre-built binaries
It has little sense to update binaries in this repository, because it would
be very large after a while. Having here a stale library is dangerous as
simulink models could be built against the old library without an error
eventhough they would not work. For example, when the API changes
(such as for DIN commands recently), the resulting binary can link agains
the old library without problems.
Michal Horn [Tue, 13 Aug 2013 12:26:51 +0000 (14:26 +0200)]
Bugs in some conditions repaired, new development error check added.
- Development error check in cancelTXLPdu added to test if reconfiguration is allowed.
- Development error check in disableLPdu added to test if reconfiguration is allowed.
- Error in test condition if buffer was or was not yet configured repaired
- Error in development check for address pointer repaired
Michal Horn [Tue, 13 Aug 2013 12:23:26 +0000 (14:23 +0200)]
Cancel and disable functions of the FlexRay API can now return an error flag if no buffer was canceled or disabled.
This can happen when all parameters of the function are right, but no reconfigurable buffer was found.
Michal Horn [Fri, 9 Aug 2013 17:20:53 +0000 (19:20 +0200)]
Better driver state detectin added.
Boolean value was not sufficient for detection of the state of the driver. We need to detect if driver was configured and if controller was configured in this order.
- Global POC Status variable removed
- Allow coldstart function extended with development errors check
- Fr All slots function implemented
- Fr Halt Communicatin implemented
- Fr Abort Communication implemented
- Fr Send WUP implemented
- Fr Set WU Channel implemented
- Fr Get POC Status implemented
- Fr Get Global Time implemented
Michal Horn [Tue, 23 Jul 2013 15:29:09 +0000 (17:29 +0200)]
Configure buffer function added, changes were made in Buffer structure and initialisation procedure
N-ew parameters into Fr_TMS570LS_BufferConfigType_st were added. Those parameters are needed for FIFO configuration
-Function Fr_config_msgRAM_parameters now returns total number of buffers (last buffer number+1). This value is needed on other places during initialisation.
-Array of addresses to buffer configuration data was renamed
-array of flags to determine if the buffer was or was not configured added,
-array of addresses of data sections for each buffer added,
-global help variablec for data cestion offset computin added.
Initialisation of all above arrays added into Fr_Init and Fr_ControllerInit.
Function Fr_PrepareLPdu used for configuring new buffer was created.
Michal Horn [Tue, 9 Jul 2013 18:28:40 +0000 (20:28 +0200)]
Error detection macro definition added, Control index count macro added.
Error detection can be switch on and off by commenting and uncommenting the macro.
Bad paramaters and proper function call order is checked when error detection is on.
Control index macro is here for array boundary definition.
Michal Horn [Tue, 9 Jul 2013 15:27:14 +0000 (17:27 +0200)]
Created header file for FlexRay driver
This file contains:
- protocol constants definions
- structure definition for global configuration
- structure definition for local node configuration
- structure definition for buffer configuration
- structure definition for message RAM configuration
- structure definition merging all above structure into one config structure
- methods for API with an interface proposed by Autosar.
Michal Sojka [Thu, 8 Aug 2013 09:48:29 +0000 (11:48 +0200)]
din: Split rpp_din_get() into two functions
One for reading via SPI chip, one for reading via comparators with
programmable threshold.
One of the reasons for split are the return values of the functions.
SPI chip reports whether a switch connected to the DIN pin is open or
closed, which depends on the pin setup. Comparators return logical value,
which might be a negated value returned by the SPI chip.
Michal Sojka [Wed, 7 Aug 2013 16:27:52 +0000 (18:27 +0200)]
Clarify DIN documentation and fix a bug
pull_type was renamed to pull_up to better express the meaning of the
boolean value. Thanks to this change, a bug was discovered in
rpp_din_setup(), where the check for which pins are programmable was
the opposite.
Michal Horn [Wed, 31 Jul 2013 15:10:20 +0000 (17:10 +0200)]
ADC get port val function repaired
It now uses generic adc read and need to distinguish between HOUTIFBK and regulary ADC port. That is why new configuration parameter has been added to the port descriptor.
Michal Sojka [Thu, 25 Jul 2013 19:32:08 +0000 (21:32 +0200)]
Add automatic CRLF conversion to SCI output
Also fix a race condition in drv_sci_send(), which could cause the
characters at the end of the string not to be printed. If the condition
in the critical section was false, then the loop was restarted from
the beginning (continue) but the length was not reverted to the original
value.
P.S. The CRLF conversion might be reverted in the future.