Michal Horn [Mon, 23 Sep 2013 15:23:32 +0000 (17:23 +0200)]
FlexRay bug in transmission repaired
The reconfiguration of the size was badly implemented. Each time a message in dynamic segment was sent, the buffer was reconfigured to its default parameters.
Michal Sojka [Fri, 20 Sep 2013 07:49:17 +0000 (09:49 +0200)]
Do not initialize CAN by default
There are several reasons for that:
1. The default configuration is useless for most applications.
2. The config was allocated on stack. Since it is remembered in can.c,
it is necessary that the configuration remains in memory forever. This
is not true for local variables, that are allocated on the stack.
Michal Horn [Thu, 19 Sep 2013 11:29:32 +0000 (13:29 +0200)]
Prohibition of the cancelation of the first and second buffer removed
There is no need to prohibit the cancelation of transmission on key slot because the synchronisation is still running even if no user messages are transmitted.
Michal Horn [Thu, 19 Sep 2013 11:23:27 +0000 (13:23 +0200)]
Detection of reconfigurable buffer in DisableLPdu and ReconfigLPdu functions merged into Fr_reconfigurable_buffer_index Fr_reconfigurable_buffer_indexFr_reconfigurable_buffer_indexFr_reconfigurable_buffer_indexFr_reconfigurable_buffer_index function
Michal Horn [Tue, 17 Sep 2013 12:51:45 +0000 (14:51 +0200)]
FlexRay RX FIFO rejectio filter repaired
There was an error in datasheet, where channel rejection filter had values 0,2,3,4, but it is supposed to be 0,1,2,3.
The FID bits in the FRF specifies the slot ID to be rejected, not accpeted as I have thought.
Buffer configuration structure expanded with one more parameter - the FID mask.
Buffer parameters check function expanded to check all the parameters of the FIFO buffer.
Michal Sojka [Fri, 13 Sep 2013 18:33:42 +0000 (20:33 +0200)]
Modify linker script to not throw away interrupt vectors
This is necessary when programs link against the rpp library and do not
compile the sys_intvecs.asm themselves. This was the case in rpp-test-sw,
but after reorganization of the build system (the library is built
separately), the processor didn't start properly.
Michal Horn [Wed, 11 Sep 2013 13:59:50 +0000 (15:59 +0200)]
Reorganize the logic for restarting FlexRay communication to be Autosar compliant
Autosar specification restricts the Fr_StartCommunication to be use only for starting the communication and no other logic should be there.
The specification orders the Fr_ControllerInit function to be able to switch POC state to Config from any other states. So all the restart logic was moved here.
Commands descriptions and rpp function documentation was modified.
Michal Horn [Wed, 11 Sep 2013 08:41:47 +0000 (10:41 +0200)]
Change the internal representation of the FlexRay buffers
An array of pointers to the configuration structures changed to the map of the buffers to the slot id.
Slot id is changed during buffer reconfiguration, thus can not be const.
Jan Dolezal [Tue, 10 Sep 2013 16:09:35 +0000 (18:09 +0200)]
rpp_sci_printk / _printkb - modified (functional part moved to drv sci.c)
eth.c - when sending - block on semaphore till send is done (notified by interrupt)
Jan Dolezal [Tue, 10 Sep 2013 16:09:35 +0000 (18:09 +0200)]
rpp_sci_printk / _printkb - modified (functional part moved to drv sci.c)
eth.c - when sending - block on semaphore till send is done (notified by interrupt)
CAN initialization has been greatly changed due to changes in API.
Now only message objects (boxes) specified by user are set up (all
of them are reset in the beginning, though).
Initialization is way more divided into functions.
Message objects to be used by functions are not specified by kind
of ID but by their order in CAN configuration.
rpp/src/rpp/rpp.c has been changed so that it contains some basic
configuration now. However, it's much more of work-around than
of solution.
Diff is quite messed up due to great refactoring of functions.
Michal Horn [Mon, 2 Sep 2013 12:36:41 +0000 (14:36 +0200)]
Clear FlexRay write data section before writting new data to avoid reading junk
The controller was always sending right data with padding of zeros, when
the size of the message was lower than the size of the buffer. But
this Output buffer registers were not automaticaly cleared before reading
new message from message RAM, which caused reading bad padding data if
the newly received message was shorter than the previous one.