2 * FlexRay Communication RPP API header file.
6 * @copyright Copyright (C) 2013 Czech Technical University in Prague
8 * @author Carlos Jenkins <carlos@jenkins.co.cr>
9 * @author Michal Horn <hornmich@fel.cvut.cz>
16 #include "drv/Fr_GeneralTypes.h"
17 #include "drv/fr_tms570.h"
22 RPP_FR_NOT_INITIALIZED,
23 RPP_FR_DRV_INITIALIZED,
24 RPP_FR_CTR_INITIALIZED,
31 * Store cluster configuration parameters.
33 * This functions provides a mechanism to do the user FlexRay configuration.
34 * The function parses the string with parameters and stores them into an
36 * For complete user configuration also rpp_fr_config_node_params and
37 * rpp_fr_config_static_buffer have to be called to configure local
38 * FlexRay parameters and at least one static buffer.
40 * The string with configuration contains hexadecimal numbers separated by spaces.
41 * Each number stands for one parameter in this order:
45 * gMaxWithoutClockCorrectionFatal
46 * gMaxWithoutClockCorrectionPassive
47 * gNetworkManagementVectorLength
49 * gNumberOfStaticSlots
50 * gOffsetCorrectionStart
51 * gPayloadLengthStatic
55 * gdDynamicSlotIdlePhase
57 * gdMinislotActionPointOffset
62 * gdWakeupSymbolRxIdle
64 * gdWakeupSymbolRxWindow
65 * gdWakeupSymbolTxIdle
69 * "0x2 0xF 0x15E0 0xF 0xF 0xC 0x15A 0x8 0xAE4 0x9 0xF 0x4 0x43 0x1 0x4 0x2 0xAE3 0x0 0x56 0xA 0x12 0x12 0x4C 0xB4 0x3C"
71 * @param [in] params Address of the string with configuration parameters
73 * @return SUCCESS if configuration successful.
74 * FAILURE if parameter parsing fails.
76 int8_t rpp_fr_config_cluster_params(const char* params);
79 * Store node configuration parameters.
81 * This functions provides a mechanism to do the user FlexRay configuration.
82 * The function parses the string with parameters and stores them into an
84 * For complete user configuration also rpp_fr_config_cluster_params and
85 * rpp_fr_config_static_buffer have to be called to configure global
86 * FlexRay parameters and at least one static buffer.
88 * The string with configuration contains hexadecimal numbers separated by spaces.
89 * Each number stands for one parameter in this order:
90 * pAllowHaltDueToClock
91 * pAllowPassiveToActive
92 * pChannels (0 - A, 1 - B, 2 - AB)
93 * pClusterDriftDamping
96 * pExternOffsetCorrection
97 * pExternRateCorrection
98 * pKeySlotUsedForStartup
101 * pMacroInitialOffsetA
102 * pMacroInitialOffsetB
103 * pMicroInitialOffsetA
104 * pMicroInitialOffsetB
107 * pOffsetCorrectionOut
108 * pSamplesPerMicrotick
110 * pWakeupChannel (0 - A, 1 - B)
112 * pdAcceptedStartupRange
115 * pDecodingCorrection
116 * syncFramePayloadMultiplexEnabled
117 * secureBuffers (0 - FR_SB_RECONFIG_ENABLED, 1 - FR_SB_STAT_REC_DISABLED_STAT_TR_DISABLED, 2 - FR_SB_ALL_REC_DISABLED, 3 - FR_SB_ALL_REC_DISABLED_STAT_TR_DISABLED)
120 * "0x0 0x0 0x2 0x1 0x3 0x3 0x0 0x0 0x1 0x1 0x10D 0x6 0x6 0x18 0x18 0x36B00 0xCD 0x151 0x0 0x1 0x0 0x2 0x81 0x36DA2 0x151 0x33 0x0 0x0"
122 * @param [in] params Address of the string with configuration parameters
124 * @return SUCCESS if configuration successful.
125 * FAILURE if parameter parsing fails.
127 int8_t rpp_fr_config_node_params(const char* params);
130 * Add new static buffer configuration into the list of buffers.
132 * This functions provides a mechanism to do the user FlexRay configuration.
133 * The function parses the string with parameters and stores them into an
134 * internal structure.
135 * For complete user configuration also rpp_fr_config_cluster_params and
136 * rpp_fr_config_node_params have to be called to configure global and local
137 * FlexRay parameters.
138 * At least one static buffer must be configured as TX. For sync and coldstart nodes
139 * the first buffer should be configured as TX.
141 * The string with configuration contains hexadecimal numbers or strings separated by spaces.
142 * Each number or string stands for one parameter in this order:
143 * channel (0 - A, 1 - B, 2 - AB)
144 * cycleCounterFiltering
148 * payloadPreambleIndicatorTr
153 * "0x2 0x0 0x1 0x9 0x1 0x0 0x0 0x1"
155 * @param [in] params Address of the string with configuration parameters
157 * @return SUCCESS if configuration successful.
158 * FAILURE if parameter parsing fails.
160 int8_t rpp_fr_config_static_buffer(const char* params);
163 * Add new dynamic buffer configuration into the list of buffers.
165 * This functions provides a mechanism to do the user FlexRay configuration.
166 * The function parses the string with parameters and stores them into an
167 * internal structure.
168 * For complete user configuration also rpp_fr_config_cluster_params,
169 * rpp_fr_config_node_params and rpp_fr_config_static_buffer have to be called
170 * to configure global, local FlexRay parameters and at least one static buffer.
172 * The string with configuration contains hexadecimal numbers or strings separated by spaces.
173 * Each number or string stands for one parameter in this order:
174 * channel (0 - A, 1 - B)
175 * cycleCounterFiltering
183 * "0x0 0x0 0x1 0x9 0x1 0x0 0x1"
185 * @param [in] params Address of the string with configuration parameters
187 * @return SUCCESS if configuration successful.
188 * FAILURE if parameter parsing fails.
190 int8_t rpp_fr_config_dynamic_buffer(const char* params);
193 * Configures new RX FIFO buffer configuration into the list of buffers.
195 * This functions provides a mechanism to do the user FlexRay configuration.
196 * The function parses the string with parameters and stores them into an
197 * internal structure.
198 * For complete user configuration also rpp_fr_config_cluster_params,
199 * rpp_fr_config_node_params and rpp_fr_config_static_buffer have to be called
200 * to configure global, local FlexRay parameters and at least one static buffer.
201 * Only one RX FIFO buffer with specified depth can be configured.
203 * The string with configuration contains hexadecimal numbers or strings separated by spaces.
204 * Each number or string stands for one parameter in this order:
206 * channel (0 - A, 1 - B, 2 - AB)
207 * cycleCounterFiltering
210 * rejectStaticSegment
211 * slotId (zero means no frame will be rejected)
214 * "0x5 0x2 0x0 0x40 0x1 0x0 0x0"
216 * @param [in] params Address of the string with configuration parameters
218 * @return SUCCESS if configuration successful.
219 * FAILURE if parameter parsing fails.
221 int8_t rpp_fr_config_fifo_buffer(const char* params);
224 * FR module initialization.
226 * Call this method before using this module.
228 * @return SUCCESS if initialization successful.\n
229 * FAILURE if module already initialized.
231 int8_t rpp_fr_init();
234 * FlexRay driver initialization.
236 * This method should be called after rpp_fr_init and before any
237 * other function from this module, except rpp_fr_config functions.
239 * The functions copies configuration data into drivers internal
240 * structures and initializes the driver.
242 * There are two ways how to configure FlexRay.
243 * 1) Passing address of the config structure as an argument from the application
244 * 2) Using rpp_fr_config functions to create user configuration. Then the argument
245 * for this function has to be NULL and configuration functions have to be called before
248 * After successful driver initialization, the FlexRay is ready for:
249 * rpp_fr_init_controller
250 * rpp_fr_get_poc_status
251 * rpp_fr_get_wakeup_rx_status
252 * rpp_fr_get_timer_irq_status
254 * @param [in] Fr_ConfigPtr Address of the structure with all FlexRay
255 * configuration parameters. If it is NULL, then default structure,
256 * filled by rpp_fr_config functions, is used.
257 * @param [out] error Address where error flags will be stored. The flags
258 * definitions can be found in fr_tms570h, with ERR_PARAM prefix.
260 * @return SUCCESS if initialization successful.
261 * FAILURE if module already initialized.
264 int8_t rpp_fr_init_driver(const Fr_ConfigType* config_ptr, uint32_t* error);
267 * FlexRay controller initialization.
269 * This method should be called after rpp_fr_init_driver and before any
270 * other function from this module.
272 * The functions checks configuration parameters and configures FlexRay
273 * controller registers.
275 * After successful controller initialization, the FlexRay is ready for:
276 * rpp_fr_get_poc_status
277 * rpp_fr_get_wakeup_rx_status
278 * rpp_fr_get_timer_irq_status
279 * rpp_fr_start_communication
281 * rpp_fr_set_wu_channel
282 * rpp_fr_get_global_time
283 * rpp_fr_get_network_management_vector
284 * rpp_fr_get_channel_status
286 * @param [in] ctrl Not used, set always to zero.
287 * @param [out] error Address where error flags will be stored. The flags
288 * definitions can be found in fr_tms570h, with ERR_PARAM and FR_INIT_ERR
291 * @return SUCCESS if initialization successful.
292 * FAILURE if module already initialized.
295 int8_t rpp_fr_init_controller(uint8_t ctrl, uint32_t* error);
298 * FlexRay start communication
300 * This method should be called after rpp_fr_init_controller and attempt
301 * to sending or receiving messages
303 * For coldstarter the function tries to listen and join an existing network.
304 * If it fails, it tries to initiate the new one.
305 * For regular node it only listens on the bus and tries to join to
306 * some existing network.
308 * After successful communication start, the FlexRay is ready for:
309 * rpp_fr_get_poc_status
310 * rpp_fr_get_wakeup_rx_status
311 * rpp_fr_get_timer_irq_status
312 * rpp_fr_set_wu_channel
313 * rpp_fr_get_global_time
314 * rpp_fr_get_network_management_vector
315 * rpp_fr_get_channel_status
317 * rpp_fr_halt_communication
318 * rpp_fr_abort_communication
319 * rpp_fr_transmit_lpdu
320 * rpp_fr_cancel_transmit_lpdu
321 * rpp_fr_receive_lpdu
322 * rpp_fr_check_tx_lpdu_status
323 * rpp_fr_disable_lpdu
324 * rpp_fr_get_clock_correction
325 * rpp_fr_get_sync_frame_list
327 * rpp_fr_cancel_timer
329 * @param [in] ctrl Not used, set always to zero.
330 * @param [out] error Address where error flags will be stored. The flags
331 * definitions can be found in fr_tms570h, with FR_STARTUP_ERR prefix.
333 * @return SUCCESS if initialization successful.
334 * FAILURE if module already initialized.
337 int8_t rpp_fr_start_communication(uint8_t ctrl, uint32_t* error);
340 * FlexRay allow communication on all slots
342 * The FlexRay node can be configured to communicate only on key frames
343 * after the startup. Using this function the communication on all
344 * configured slots can be allowed.
346 * The function should be called only when the communication is running.
348 * @param [in] ctrl Not used, set always to zero.
350 * @return SUCCESS if started successfully.
351 * FAILURE if timeout reached.
354 int8_t rpp_fr_all_slots(uint8_t ctrl);
357 * FlexRay stop communication after the end of the cycle.
359 * The function should be called only when the communication is running.
361 * After the communication is stopped, only those functions are allowed:
362 * rpp_fr_set_wu_channel
363 * rpp_fr_get_global_time
364 * rpp_fr_get_network_management_vector
365 * rpp_fr_get_channel_status
366 * rpp_fr_get_clock_correction
367 * rpp_fr_get_sync_frame_list
368 * rpp_fr_get_wakeup_rx_status
369 * rpp_fr_get_poc_status
371 * To establish new communication, reset the device.
373 * @param [in] ctrl Not used, set always to zero.
375 * @return SUCCESS if command passed successfully.
376 * FAILURE if command rejected.
379 int8_t rpp_fr_halt_communication(uint8_t ctrl);
382 * FlexRay stop communication immediately.
384 * The function should be called only when the communication is running.
386 * After the communication is stopped, only those functions are allowed:
387 * rpp_fr_set_wu_channel
388 * rpp_fr_get_global_time
389 * rpp_fr_get_network_management_vector
390 * rpp_fr_get_channel_status
391 * rpp_fr_get_clock_correction
392 * rpp_fr_get_sync_frame_list
393 * rpp_fr_get_wakeup_rx_status
394 * rpp_fr_get_poc_status
396 * To establish new communication, reset the device.
398 * @param [in] ctrl Not used, set always to zero.
400 * @return SUCCESS if command passed successfully.
401 * FAILURE if command rejected.
404 int8_t rpp_fr_abort_communication(uint8_t ctrl);
407 * FlexRay send wakeup pattern.
409 * The function should be called after FlexRay controller is initialized
410 * and before the communication start.
412 * @param [in] ctrl Not used, set always to zero.
414 * @return SUCCESS if command passed successfully.
415 * FAILURE if command rejected.
418 int8_t rpp_fr_send_wup(uint8_t ctrl);
421 * FlexRay set channel for wakeup pattern sending.
423 * The function should be called after FlexRay controller is initialized
424 * and before the communication start.
426 * @param [in] ctrl Not used, set always to zero.
428 * @return SUCCESS if command passed successfully.
429 * FAILURE if command rejected.
432 int8_t rpp_fr_set_wu_channel(uint8_t ctrl, Fr_ChannelType channel);
435 * Get FlexRay POC state
437 * The function can be called any time after driver is initialized.
439 * @param [in] ctrl Not used, set always to zero.
440 * @parap [out] poc_status_ptr Address where status will be stored.
442 * @return SUCCESS if status retrieved successfully.
443 * FAILURE if something failed.
446 int8_t rpp_fr_get_poc_status(uint8_t ctrl, Fr_POCStatusType* poc_status_ptr);
449 * Send a message on the bus in the specified frame
451 * The function can be called any time when communication is running
452 * (Fr_StartCommunication was called).
454 * If the buffer assigned to the frame is in continuous mode, this
455 * functions starts sending a message periodically. The transmission can
456 * be stopped by rpp_fr_cancel_transmit_lpdu.
457 * If the buffer assigned to the frame is in single-shot mode, the
458 * message is sent only once.
460 * @param [in] ctrl Not used, set always to zero.
461 * @param [in] lpdu_idx Index of the frame, where the message will be sent.
462 * @param [in] lsdu Address of the first byte of the message.
463 * @param [in] lsdu_length Number of bytes of the message.
465 * @return SUCCESS if message was transmitted.
466 * FAILURE if something failed.
469 int8_t rpp_fr_transmit_lpdu(uint8_t ctrl, uint16_t lpdu_idx, const uint8_t* lsdu, uint8_t lsdu_length);
472 * Cancel a transmission of the message.
474 * The function can be called any time when communication is running
475 * (Fr_StartCommunication was called).
477 * This is one way to stop transmission for buffers configured
478 * in continuous mode.
480 * @param [in] ctrl Not used, set always to zero.
481 * @param [in] lpdu_idx Index of the frame, where the message transmission will be stopped.
483 * @return SUCCESS if the transmission was stopped.
484 * FAILURE if something failed.
487 int8_t rpp_fr_cancel_transmit_lpdu(uint8_t ctrl, uint16_t lpdu_idx);
490 * Receive a message from the bus in the specified frame
492 * The function can be called any time when communication is running
493 * (Fr_StartCommunication was called).
495 * If new message was received in static or dynamic buffer into some RX buffer,
496 * this function can retrieve it.
498 * @param [in] ctrl Not used, set always to zero.
499 * @param [in] lpdu_idx Index of the frame where message will be received from.
500 * @param [out] lsdu Address of the first byte of the buffer, where message will be stored.
501 * @param [out] lpdu_status Address where the status will be stored. It can be:
502 * FR_NOT_RECEIVED, FR_RECEIVED, FR_RECEIVED_MORE_DATA_AVAILABLE - for FIFO only.
503 * @param [out] lsdu_length Number of bytes of the message.
505 * @return SUCCESS if message was received.
506 * FAILURE if something failed.
509 int8_t rpp_fr_receive_lpdu(uint8_t ctrl, uint16_t lpdu_idx, uint8_t* lsdu, Fr_RxLPduStatusType* lpdu_status, uint8_t* lsdu_length);
512 * Check TX buffer status
514 * The function can be called any time when communication is running
515 * (Fr_StartCommunication was called).
517 * If buffer configured in single-shot mode, the transmission request (TXR)
518 * is pending until the message is send.
519 * For buffers configured in continuous mode, the transmission request is
522 * The TXR pending or not pending is the status of the buffer.
524 * @param [in] ctrl Not used, set always to zero.
525 * @param [in] lpdu_idx Index of the frame to which the buffer is assigned.
526 * @param [out] lpdu_status Address of the status. It can be FR_TRANSMITTED,
527 * which means the TXR is not pending, or FR_NOT_TRANSMITTED which means that
530 * @return SUCCESS if everything is OK.
531 * FAILURE if something failed.
534 int8_t rpp_fr_check_tx_lpdu_status(uint8_t ctrl, uint16_t lpdu_idx, Fr_TxLPduStatusType* lpdu_status);
537 * Disable FlexRay buffer
539 * The function can be called any time when communication is running
540 * (Fr_StartCommunication was called).
542 * This functions resets the configuration of the selected buffer.
543 * The disabled buffer is not usable any more.
545 * @param [in] ctrl Not used, set always to zero.
546 * @param [in] lpdu_idx Index of the frame to which the buffer is assigned.
548 * @return SUCCESS if buffer was disabled.
549 * FAILURE if something failed.
552 int8_t rpp_fr_disable_lpdu(uint8_t ctrl, uint16_t lpdu_idx);
555 * Get FlexRay global time
557 * The function can be called any time after controller is initialized.
559 * @param [in] ctrl Not used, set always to zero.
560 * @param [out] cycle Adress where the number of actual cycle will be stored.
561 * @param [out] macroticks Address where offset in the cycle will be stored.
563 * @return SUCCESS if everything is OK.
564 * FAILURE if something failed.
567 int8_t rpp_fr_get_global_time(uint8_t ctrl, uint8_t* cycle, uint16_t* macroticks);
570 * Get Network management vector.
572 * The function can be called any time after controller is initialized.
574 * The FlexRay controller updates the vector at the end of every cycle by
575 * doing bit-wise or on every network managemet vectors received from all nodes.
577 * The NM vector can be sent to a frame by a buffer with payloadPreambleIndicatorTr
578 * set. Those frames are automatically processed by the controller. But sending the
579 * vector has to be done manually by copying the NM vector data (obtainable by
580 * this function) into the TX buffer (using rpp_fr_transmit_lpdu function).
582 * @param [in] ctrl Not used, set always to zero.
583 * @param [out] nm_vector Address where the vector will be stored. The size of the buffer has to be at least gNetworkManagementVectorLength.
585 * @return SUCCESS if everything is OK.
586 * FAILURE if something failed.
589 int8_t rpp_fr_get_network_management_vector(uint8_t ctrl, uint8_t* nm_vector);
592 * Get Channel status.
594 * The function can be called any time after controller is initialized.
596 * The output of the function is bitcoded in this way:
597 * Bit 0: Channel A/B aggregated channel status vSS!ValidFrame
598 * Bit 1: Channel A/B aggregated channel status vSS!SyntaxError
599 * Bit 2: Channel A/B aggregated channel status vSS!ContentError
600 * Bit 3: Channel A/B aggregated channel status additional communication
601 * Bit 4: Channel A/B aggregated channel status vSS!Bviolation
602 * Bit 5: Channel A/B aggregated channel status vSS!TxConflict
603 * Bit 6: Not used (0)
604 * Bit 7: Not used (0)
605 * Bit 8: Channel A/B symbol window status data vSS!ValidMTS
606 * Bit 9: Channel A/B symbol window status data vSS!SyntaxError
607 * Bit 10: Channel A/B symbol window status data vSS!Bviolation
608 * Bit 11: Channel A/B symbol window status data vSS!TxConflict
609 * Bit 12: Channel A/B NIT status data vSS!SyntaxError
610 * Bit 13: Channel A/B NIT status data vSS!Bviolation
611 * Bit 14: Not used (0)
612 * Bit 15: Not used (0)
615 * @param [in] ctrl Not used, set always to zero.
616 * @param [out] channel_a_status Address where the bitcoded status of the channel A will be stored.
617 * @param [out] channel_b_status Address where the bitcoded status of the channel B will be stored.
619 * @return SUCCESS if everything is OK.
620 * FAILURE if something failed.
623 int8_t rpp_fr_get_channel_status(uint8_t ctrl, uint16_t* channel_a_status, uint16_t* channel_b_status);
626 * Get clock correction.
628 * The function can be called while communication is running or was stopped.
630 * @param [in] ctrl Not used, set always to zero.
631 * @param [out] rate_correction Address where the rate will be stored.
632 * @param [out] offset_correction Address where the offset will be stored.
634 * @return SUCCESS if everything is OK.
635 * FAILURE if something failed.
638 int8_t rpp_fr_get_clock_correction(uint8_t ctrl, int16_t* rate_correction, int32_t* offset_correction);
641 * Get clock correction.
643 * The function can be called while communication is running or was stopped.
645 * @param [in] ctrl Not used, set always to zero.
646 * @param [out] rate_correction Address where the rate will be stored.
647 * @param [out] offset_correction Address where the offset will be stored.
649 * @return SUCCESS if everything is OK.
650 * FAILURE if something failed.
653 int8_t rpp_fr_get_sync_frame_list(uint8_t ctrl, uint8_t list_size, uint16_t* channel_a_even_list, uint16_t* channel_b_even_list, uint16_t* channel_a_odd_list, uint16_t* channel_bodd_list);
656 * Get the status of WUP receiving
658 * The function can be called any time after controller is initialized.
660 * If Wake Up Pattern was received on some channel, the flag is set in status address.
661 * Bit 0: Wakeup received on channel A indicator
662 * Bit 1: Wakeup received on channel B indicator
665 * @param [in] ctrl Not used, set always to zero.
666 * @param [out] status Address where the status will be stored.
668 * @return SUCCESS if everything is OK.
669 * FAILURE if something failed.
672 int8_t rpp_fr_get_wakeup_rx_status(uint8_t ctrl, uint8_t* status);
675 * Set an absolute timer and start it.
677 * The function can be called any time after communication is running.
678 * The FlexRay controller has two absolute timers. Each of them can be
679 * configured to request the interrupt, when the global time reaches
680 * configured cycle and offset.
682 * Timer interrupt request can be detected by rpp_fr_get_timer_irq_status.
683 * Timer interrupt request can be cleared by rpp_fr_clear_timer_irq
684 * Timer can be canceled by rpp_fr_cancel_timer.
686 * @param [in] ctrl Not used, set always to zero.
687 * @param [in] timer_idx Index of the timer (0,1).
688 * @param [in] cycle_threshold Number of the cycle.
689 * @param [in] offset_threshold Offset in the cycle in mactroticks.
691 * @return SUCCESS if everything is OK.
692 * FAILURE if something failed.
695 int8_t rpp_fr_set_timer(uint8_t ctrl, uint8_t timer_idx, uint8_t cycle_threshold, uint16_t offset_threshold);
698 * Stops an absolute timer, clear IRQ.
700 * The function can be called any time after communication is running.
702 * The FlexRay controller has two absolute timers. Each of them can be
703 * configured to request the interrupt, when the global time reaches
704 * configured cycle and offset. This function stops the timer and clears
705 * the interrupt request.
707 * Timer interrupt request can be detected by rpp_fr_get_timer_irq_status.
708 * Timer interrupt request can be cleared by rpp_fr_clear_timer_irq
709 * Timer can be started by rpp_fr_set_timer.
711 * @param [in] ctrl Not used, set always to zero.
712 * @param [in] timer_idx Index of the timer (0,1).
714 * @return SUCCESS if everything is OK.
715 * FAILURE if something failed.
718 int8_t rpp_fr_cancel_timer(uint8_t ctrl, uint8_t timer_idx);
721 * Clear IRQ flag of the absolute timer
723 * The function can be called any time after communication is running.
725 * The FlexRay controller has two absolute timers. Each of them can be
726 * configured to request the interrupt, when the global time reaches
727 * configured cycle and offset. This function clears the IRQ flag.
729 * Timer interrupt request can be detected by rpp_fr_get_timer_irq_status.
730 * Timer can be started by rpp_fr_set_timer.
731 * Timer can be canceled by rpp_fr_cancel_timer.
733 * @param [in] ctrl Not used, set always to zero.
734 * @param [in] timer_idx Index of the timer (0,1).
736 * @return SUCCESS if everything is OK.
737 * FAILURE if something failed.
740 int8_t rpp_fr_clear_timer_irq(uint8_t ctrl, uint8_t timer_idx);
743 * Get IRQ flag of the absolute timer
745 * The function can be called any time after communication is running.
747 * The FlexRay controller has two absolute timers. Each of them can be
748 * configured to request the interrupt, when the global time reaches
749 * configured cycle and offset. Using this function the IRQ can be detected.
751 * Timer interrupt request can be cleared by rpp_fr_clear_timer_irq
752 * Timer can be started by rpp_fr_set_timer.
753 * Timer can be canceled by rpp_fr_cancel_timer.
755 * @param [in] ctrl Not used, set always to zero.
756 * @param [in] timer_idx Index of the timer (0,1).
758 * @return SUCCESS if everything is OK.
759 * FAILURE if something failed.
762 int8_t rpp_fr_get_timer_irq_status(uint8_t ctrl, uint8_t timer_idx, boolean_t* irq_pending);
765 * Get information about the driver vendor, module and version.
767 * The function can be called any time.
769 * @param [out] version Address, where the information will be stored.
771 * @return always SUCCESS
774 int8_t rpp_fr_get_driver_version(Std_VersionInfoType* version);
777 * Get configuration parameter value from the internal driver structures.
779 * The function can be called any time.
781 * @param [in] ctrl Not used, set always to zero.
782 * @param [in] param_idx The index if the parameter. You can find the indexes in Fr_GeneralTypes.h file with FR_CIDX prefix.
783 * @param [out] param_value Address, where the information will be stored.
785 * @return SUCCESS if everything is OK.
786 * FAILURE if something failed.
789 int8_t rpp_fr_read_com_ctrl_config(uint8_t ctrl, uint8_t param_idx, uint32_t* param_value);
791 #endif /* __RPP_FR_H */