RS Canfd
RS Canfd
RS Canfd
RH850/U2A
CAN-FD Frame-Routing Autonomous Gateway
Introduction
The RS-CANFD CAN controller in version V4, as included in the RH850/U2x product series, is able to
support implicit (autonomous) frame-level routing. In combination with its DMA capabilities and the SDMAC
unit within these products, the routing can be expanded even beyond the CAN controller unit borders. In
products with more than one RS-CANFD unit, up to 16 CAN channels can be included in the routing (with
some limitations). This kind of gateway application does not require any support by CPU computing power,
except for error situations. In this application note, a system with 4 channels on each of two RS-CANFD units
is described.
As RS-CANFD V4 also supports gateway and DMA operation with transmit queues, the frame-level routing
of a gateway can be realized including the often demanded “Most Priority First Out” (MPFO) principle.
Note that signal level gateway routing still requires CPU operation and support.
Target Device
Conventions
Within register descriptions, the prefix “RSCFDnCFD” (as mentioned in the user’s manual) is omitted for
better readability.
References
Contents
Within the RH850/U2A product, a frame-level autonomous CAN-FD routing gateway looks like this:
Figure 1: Overview
Within a RS-CANFD unit, the (internal) gateway functionality is used to perform frame-level routing. Among
the units, the SDMAC (DMA) unit is used to transfer CAN-FD frames from a receive FIFO (RX-FIFO) of one
unit one transmit queues of each channel of another RS-CANFD unit.
In our application example configuration, the gateway configuration is such, that all frames arriving at one
channel shall be transferred to all other channels of all units, as shown in figure 1. However, the arriving
frame is not copied to the arrival channel itself.
Also, in the example configuration, only even numbered channels are used. The odd numbered channels are
used to form a CAN bus with the associated even channels (01, 23 etc.). This avoids the necessity to
have acknowledging on all channels, and a monitoring tool can be plugged in randomly.
The application is based on the RS-CANFD V4 application driver, which is described in application note
“CAN Usage”, Renesas document R01AN2535.
1.2 Resources
The following resources are going to be used. For the example application, values of the configuration are
given.
• Channels: All channels can be used.
In the example, only even channels are used for the gateway, odd channels are used as
acknowledge generators to allow a flexible attachment of a probing tool with limited number of
channels.
• Reception Rules: Individual rules can be set for up 384 IDs per channel (1536 rules in total for the 8-
channel RS-CANFD V4).
In the example, only one rule is used per channel to perform the frame routing. This rule declares
that all IDs are routed to all even channels (except the local one) and to one dedicated RX-FIFO unit,
which is supporting the DMA transfer to the other RS-CANFD unit.
In addition, in the example one additional rule per channel is reserved for the reception of a special
message into an extra RX-FIFO, which is the “exit” condition of the application.
• Receive FIFO (RX-FIFO) Units: One RX-FIFO is required for each source channel in the receiving
RS-CANFD unit.
In the example, 4 RX-FIFO units are used to serve the even channels of the receiving RS-CANFD
unit. As every RX-FIFO is handled individually by a SDMAC channel, its size can be set to a
minimum, which is 4 entries. After every reception, the assigned SDMAC channel will immediately
fetch the received frame and transfer it.
In addition, in the example one additional RX-FIFO is reserved for the reception of a special
message, which is the “exit” condition of the application.
• Transmit Queues: Every channel has 4 transmit queues. The fourth transmit queue is needed for
DMA usage when transferring frames from the other unit. All other queues (0…2) are used for the
internal gateway of the RS-CANFD unit.
In the example, four channels per unit are used in the gateway, thus three transmit queues are used
for the internal gateway in a one-to-one assignment. This balances best the number of messages
within the queues and prevents best any overflow conditions. The used queue size is set to its
maximum, which is 16, if all queues are used equally. When using more than 4 channels per unit,
the use of the first three transmit queues must be shared among several channels.
• Unused resources:
o Transmit FIFO: Not used, as it does not support the MPFO principle.
o Receive Message Boxes: Not used for the gateway but can be used in addition for any
further software-based routing purposes (like signal routing).
o Transmit Message Boxes: Not used for the gateway.
In case that software-based transmissions are required (like for signal routing), some
transmit message boxes (at least two) should be derived from the transmit queues by
reducing their size.
The internal gateway configuration within one RS-CANFD unit is looking like this:
All incoming messages of a channel are routed to these destinations (4 in total for the example):
• One RX-FIFO unit, for triggering the SDMAC channel to transfer to the other unit
• One of the first three transmit queues of three channels (all channels except the local one).
While the RX-FIFO unit is storing the message with SDMAC triggering for a transfer to another RS-CANFD
unit, the transmit queues are directly triggering the transmission of the corresponding channels. This
forwarding from reception into a transmit queue is the essential part of the internal gateway of RS-CANFD.
Not shown in the figure is the additional rule check for the program exit. If an extended-ID message arrives
on any channel, this message is not forwarded to the internal gateway, but to a separate RX-FIFO in order to
trigger an interrupt. This CPU interrupt then is used to exit the application.
For the global settings of the RS-CANFD unit, the following settings are considered:
• Mirror Mode (CFDGCFG.MME)
For internal gateway operation, it is not mandatory to set this flag. MME allows the copying of own
sent messages into a dedicated storage according to special filter rules. Here, it is an option.
As an example configuration in this application note, the four even numbered channels of each RS-CANFD
unit are actively included in the hardware gateway. The other four (uneven numbered) channels are used as
acknowledging channels, so that every bus between an even and an odd channel (i.e., 01, 23 etc.) does
not require an additional node to work. Acknowledging (odd) channels are not receiving any message; they
are simply acknowledging each message on the bus to be valid.
The four even numbered channels are having the following special configuration:
• Channel Error Signalling (CFDCmCTR.TDCVFIE, -.BLIE, -.BOEIE)
These channel errors require special attention for software; in case of transmitter delay
compensation errors, bus-off or bus-lock situations a restart of the channel may be required.
Bus-off recovery is set to its standard (ISO rule compatible), this also means that recovery happens
automatically.
• Transmit Queues (CFDTXQCCxm)
These are all enabled; with queues 0…2 set in gateway operation mode, queue 3 in normal mode.
Overwrite mode is disabled for all queues, so that the gateway must not lose any message, even if it
should get repeated before an old one was sent out. The interrupt of the queues is enabled for every
message (but not used by software). The depth is set equally for all queues to be half of the
maximum size. This setting would take all transmit buffers in use with a queue. Entry windows
(buffers) of the queues are the buffers 0 (queue 0), 31 (queue 1), 32 (queue 2) and 63 (queue 3).
Payload size of the transmit queues does not need to be adjusted; in RS-CANFD V4 it is always
covering the maximum payload size of 64 data bytes.
• Bit rate
In order to show the performance, the CAN-FD bitrate is set to 500 kbit/s (arbitration) and 4 Mbit/s
(data) speed. Transmitter compensation is activated and set such, that the secondary sampling point
has the same position in the transmitted and feedback bit, as in the reception bit.
CFPLS RSCFD_FIFODL_8 0
CFM RSCFD_FIFO_MODE_RX 0
CFITSS RSCFD_FIFO_IT_REFCLK 0
CFITR RSCFD_FIFO_IT_REFCLK1 0
CFIM RSCFD_FIFO_INT_ONLEVEL 0
CFIGCV RSCFD_FIFO_ILEVEL_1D8 0
CFTML 0 →
CFDC RSCFD_FIFO_DEPTH_0 0
CFITT 0 →
CFFIE 0 →
CFCCEk
CFOFRXIE 0 →
CFOFTXIE 0 →
CFMOWN RSCFD_COM_FIFO_DSCMODE 0
CFBMIE 0 →
TXQIM RSCFD_TXQ_INT_ONLAST 0
TXQDC RSCFD_TXQ_OFF 0
TXQFIE 0 →
TXQOFRXIE 0 →
TXQOFTXIE 0 →
CFM RSCFD_FIFO_MODE_RX 0
CFITSS RSCFD_FIFO_IT_REFCLK 0
CFITR RSCFD_FIFO_IT_REFCLK1 0
CFIM RSCFD_FIFO_INT_ONLEVEL 0
CFIGCV RSCFD_FIFO_ILEVEL_1D8 0
CFTML 0 →
CFDC RSCFD_FIFO_DEPTH_0 0
CFITT 0 →
CFFIE 0 →
CFCCEk
CFOFRXIE 0 →
CFOFTXIE 0 →
CFMOWN RSCFD_COM_FIFO_DSCMODE 0
CFBMIE 0 →
To support the gateway functionality, every included channel (all even channels in the example) gets at least
one reception rule. This reception rule must perform the following actions:
• Filter the messages which must be processed for the gateway.
• Set the gateway target mode to “transmit queue” instead of “transmit FIFO”.
• Define a label for the filtered and processed messages to identify them when monitoring the gateway
operation.
• As destination targets, set the dedicated RX-FIFO unit for the unit gateway (buffer for the SDMAC)
and all transmit queues of the other channels within the internal gateway. In the example, this yields
7 destinations.
• When using more than 4 channels in the gateway per unit, the maximum number of destinations
must be taken into consideration, which is 8. In this case, not all frames can be routed to all
destinations at a time with this approach, if a local reception of the gateway is desired, too. A
selective routing to dedicated destinations, depending on the ID of the frames may be required. The
example with 4 channels already is using 4 destinations, because all received frames shall be copied
to all other channels, except the receiving channel.
The target setting within GAFLP1x is different for each of the operating channels of the internal gateway (0,
2, 4, 6): in this register, the destinations (RX-FIFO units and transmit queues of other channels) are
specified.
The following scheme is used for the channels of the internal gateway, with IFL = {z1, z2} of the table above:
• Channel 0: receive into RXFIFO0, and into Channel 2,4,6 TX Queues 0, 0, 0; IFL = 00
• Channel 2: receive into RXFIFO1, and into Channel 0,4,6 TX Queues 0, 1, 1; IFL = 01
• Channel 4: receive into RXFIFO2, and into Channel 0,2,6 TX Queues 1, 1, 2; IFL = 10
• Channel 6: receive into RXFIFO3, and into Channel 0,2,4 TX Queues 2, 2, 2 ; IFL = 11
The RX-FIFO units are the buffers for reception of all messages, which shall be transferred from one unit of
RS-CANFD to another. In this example, for each destination transmit queue of the other RS-CANFD unit,
one RX-FIFO is used on the local unit. That means, the duplication of a frame from reception into several
destinations of another RS-CANFD unit is performed by storing the frame in several RX-FIFO units at a time.
Also, this means that a RX-FIFO is reception destination of all receiving (even) channels of the internal
gateway within a RS-CANFD unit.
The RX-FIFO units shall be configured such, that they can hold the full length of any frame in worst case
(maximum length of CAN-FD). The interrupt trigger of the RX-FIFO shall be set to an interrupt on every
reception, even though this interrupt will not be handled by software but is the SDMAC trigger instead.
The RX-FIFO depth should be two frames per channel at minimum, because the transfer by the SDMAC
takes time, while another frame may arrive.
RFDC RSCFD_FIFO_DEPTH_0 0
RFIM RSCFD_FIFO_INT_ONLEVEL 0
RFIGCV RSCFD_FIFO_ILEVEL_1D8 0
For every channel, four transmit queues are available. When using 4 channels for the internal gateway, three
of the transmit queues are used for the internal gateway, while the 4th queue is left to be used by the unit
gateway transfers of the SDMAC.
If more than 4 channels are used in the internal gateway, then every of the first three queues shall be a
destination for not one, but several channels of the same unit. This is defined in the reception rules, but
beyond this application note.
For a transmit queue which is used in the internal gateway, the following settings shall be applied:
• The gateway function of the transmit queue is enabled.
This means, that this queue will not be available for use with software-based transmission.
• The size of the queues should be balanced and at a high level. In the example, as all four transmit
queues are used, the size of every queue is set to 16, which is a quarter of all available message
boxes, and no message boxes are left for transmission beyond the gateway.
For the transmit queue used with SDMAC (the unit gateway transfer), the gateway function must be disabled,
because the SDMAC is using them similarly like software, even though the queue is operated in DMA mode,
where an explicit push-in is executed automatically. In this example configuration, the overwrite mode was
enabled for the fourth (SDMAC assigned) transmit queue. This is for demonstration, to show the effect how
the overwrite mode works. For equal treatment of messages and channels, the overwrite mode should be set
off for this queue, too.
The SDMAC is used to transfer messages between two RS-CANFD units. For every RS-CANFD channel of
a unit, one SDMAC channel is used to transfer the frames. CAN-FD frames are fetched from a dedicated
RX-FIFO of the RS-CANFD source unit and written to the 4th transmit queue of every used channel in the
destination RS-CANFD unit.
The task of SDMAC is to duplicate a frame into several destinations.
Consequently, the functional view of the SDMAC channel operation looks like this:
As soon as the RX-FIFO assigned to a receiving channel of a RS-CANFD unit A triggers it, the SDMAC will
fetch the frame from the RX-FIFO by reading the DMA access memory area of it. The length of the DMA is
set such, that it covers the full RX-FIFO frame length size. This will trigger the RX-FIFO to shift to the next
received message, if available.
The final destination of the SDMAC channel are the 4th transmit queues of all channels of the transmitting
RS-CANFD unit B. Even though not all bits of control and pointer operation of the RX-FIFO are the same as
on the transmit queue, the direct copying works nevertheless, because non-existent bits in the transmit
queue destinations are ignored by the RS-CANFD hardware. The size of the access windows of RX-FIFO
and transmit queues are identical, and the ordering of information is equal.
To achieve this target, the received frame from the RX-FIFO must be copied multiple times, so that each 4th
transmit queue of RS-CANFD unit B will get it. To do this, the SDMAC channel first copies the frame into a
RAM location. From there, the multiple copying steps are performed by the next steps, each one to write the
frame into a 4th transmit queue of used channels in RS-CANFD unit B.
SDMAC supports descriptor chains, which allow several operations in sequence; in our example in five
steps: First to read the RX-FIFO into a RAM location, and subsequent four to copy the frame from the RAM
location into the four used channels’ 4th transmit queues.
Note that in this configuration, the RX-FIFO will never be filled with more than one frame, while it is ready to
receive a second one from the CAN channel. SDMAC must be able to fetch this frame from the RX-FIFO,
until the next frame is reception is completed. Otherwise, the RX-FIFO would trigger another DMA request,
while SDMAC is still working with the previous one; and the same would cause a request overflow condition
on SDMAC.
The transfer configuration of SDMAC is set to longwords (4 bytes) as access size for source and destination,
with incrementing addresses on both sides, and 19 longwords in total for one block. 19 longwords are the
RX-FIFO and transmit queue DMA window size, when the payload length of CAN-FD is set to 64 bytes
(maximum).
The hardware trigger source is used, its channel depends on the assigned RX-FIFO of the receiving RS-
CANFD unit.
For proper operation, the SDMAC needs to get an assigned SPID, and an opened peripheral guard and
RAM guard window assigned to the same. This configuration is made in the peripheral guard hardware,
which depends on the target device.
The used descriptor is required to allow a restore of source, destination addresses and the transfer count,
after the current transfer was completed. By setting the continuation flag (CF), the descriptor also restores
the enabled state of the channel, so that it is ready for the next trigger.
The channel configuration is set according to the requirements of the gateway functionality, as follows (“n“ is
the channel index of the SDMAC, n = {0…7}):
TSRn TSR 0 This forces the descriptor chain lookup for next
execution steps for this event.
DTS SDMAC_TRANSSIZE_4BYTE 2
CAIE
CAEE
SGCRn → 0
RSn RS 45, 46, 47, 48 (RS-CANFD unit 0 RX-FIFO triggers) Value depends on the assigned SDMAC channel
53, 54, 55, 56 (RS-CANFD unit 1 RX-FIFO triggers) number.
DPCRn UPF SDMAC_DESCUPDATEFLAG_SAR | Registers SAR, DAR and TSR will get updated
SDMAC_DESCUPDATEFLAG_DAR | by the descriptor execution.
SDMAC_DESCUPDATEFLAG_TSR
According to the settings of the DPCRn registers, each descriptor of the chain of each channel contains the
register values of SARn, DARn and TSRn.
Additionally, each descriptor of SDMAC must contain the DPPTRn register value. The PTR (pointer to
descriptor) value is creating the linked list of the descriptor chain, and for the last element in the descriptor
chain, PTR is set such, that it points to the first descriptor of the chain. This setting achieves that the
descriptor chain is used every time again, as soon as a new trigger from the RX-FIFO of RS-CANFD (the
trigger source) happens. At the same time, by using the last descriptor of the chain, the initial values of
SARn, DARn and TSRn are restored, so that the subsequent transfer is identical with the previous one.
Background of this is, that SARn, DARn and TSRn are changing during the SDMAC channel operation,
according to the processing of the DMA transfer (incrementing SARn, and DARn, decrementing TSRn).
First descriptor of the chain of SDMAC channel n = {0…7} and RS-CANFD unit m = {0…1}, m=n/4
(example with 4 channels per unit):
SARn SAR &( rscfd_rxfifo_p[ m ] Address of the RX-FIFO buffer n of the receiving
->buf[ n%4 ].id ) RS-CANFD unit, which is assigned to channel n
of the SDMAC unit:
rscfd_rxfifo_p[ RSCAN-FD_Unit_RX ]
->buf[ RX-FIFO# ].id
DARn DAR &GW_FrameBuffer[ 0 ][ n ] Address of the RAM buffer used for this channel.
Second, third and fourth descriptor of the chain of SDMAC channel n (example with 4 channels per unit):
SARn SAR &GW_FrameBuffer[ 0 ][ n ] Address of the RAM buffer used for this channel.
SARn SAR &GW_FrameBuffer[ 0 ][ n ] Address of the RAM buffer used for this channel.
In RH850/U2A, the RS-CANFD peripherals and RAM are protected against the access of the SDMAC
channels. Therefore, the corresponding peripheral and RAM guard instances must be opened for read- and
write accesses of the SDMAC channels by setting their SPID flag.
If the peripheral guard is not opened, the SDMAC cannot transfer the data (neither reading the RX-FIFO, nor
using the RAM, nor writing to the transmit queue) and would stop with addressing errors. Note that even
though the addressing error may be indicated at an address which is not the first one to attempt, the access
of the first address already is blocked. The reason for this is, that the guard and the associated guard error
processing runs on a slower clock than SDMAC and PE units, but nevertheless is effective all time.
See the source code for details on which guard registers settings are required.
By doing the following steps of the RS-CANFD driver set, the CAN controllers are initialized:
1. RSCFD_PortEnable:
Enable the ports for the CAN controller channels.
Both TX and RX ports are set in direction and associated alternate peripheral function.
2. RSCFD_Stop:
Set a global reset to the CAN controller unit.
This is required to perform the global reconfiguration, if the CAN controller might have been in use
before.
3. RSCFD_SetGlobalConfiguration:
Set the global configuration of the CAN controller unit.
Most of all, this defines the shared memory setup and general operation settings like global errors.
4. RSCFD_SetGlobalFIFOConfiguration:
Settings for the RX-FIFO units used.
5. RSCFD_CreateInterrupt:
The RX-FIFO interrupt for application exit and the global error state (like missed messages) are
activated.
6. RSCFD_Start:
Leave the global reset state, ready to initialize the channels.
7. RSCFD_SetGlobalConfiguration:
Second call for the global configuration, while in global operation state.
This initializes the DMA operation options of the CAN controller unit.
8. RSCFD_EnableRXFIFO:
When in global operation state, the RX-FIFO units can be activated.
9. RSCFD_SetAFLEntry:
Specifically for the used even channels, the reception rules for gateway reception and application
exit are entered.
Following the global initialization of the RS-CANFD units, the SDMAC channels are initialized in the following
steps; using some functions of the SDMAC driver package:
1. Open the peripheral guards
The access right for read/write is assigned to the SPID of the SDMAC channels.
2. SDMAC_Reset:
Global operation setting (activation) and round-robin mode are set for the SDMAC unit.
3. SDMAC_SetDescriptor:
Each channel gets its descriptor to allow continuous operation with identical data processing.
4. SDMAC_HWTriggerChannel:
The associated trigger source is selected for the channel, including trigger group selection.
5. SDMAC_ConfigureChannel:
The channel is initialized for the data transfers (source and destination, trigger, transaction mode
and size).
6. SDMAC_EnableChannel:
Activates the SDMAC channel to be ready for a hardware trigger from the RS-CANFD units.
In a final step, the RS-CANFD channels are activated, now that the whole infrastructure of the gateway is
ready to handle the receptions and transmissions:
1. RSCFD_SetChannelConfiguration:
Channel specific settings are made, like bit rate/timing, interrupt sources (for error handling), transmit
queue initialization and CAN-FD specific settings.
Even and odd channels get different settings; for example the odd channels would not make use of
any transmit queues or error interrupts.
2. RSCFD_Start:
The channels are set to operation mode.
At this point, the gateway will start operation with the integration phase on the CAN(-FD) bus of the
even and odd channels.
After these steps, the gateway is active and does not require further CPU support, apart from error
situations. Errors would be reported as interrupts; in this case, the gateway function might require temporary
stopping or re-initialization of RX-FIFO units.
If an extended ID message is detected by the second AFL rule on any channel, the associated RX-FIFO unit
would trigger an interrupt, from where the global “exit” flag is set, which in turn ends the application.
//============================================================================
// PROJECT = RSCFD Type RSCFDFD_UCIAPRCN_V4
//============================================================================
// C O P Y R I G H T
//============================================================================
// Copyright (c) 2020 by RENESAS Electronics (Europe) GmbH. All rights reserved.
// Arcadiastrasse 10
// D-40472 Duesseldorf
// Germany
//============================================================================
//Purpose: RSCFD Driver Hardware Configuration Sets for Gateway
//
//Warranty Disclaimer
//
//Because the Product(s) is licensed free of charge, there is no warranty
//of any kind whatsoever and expressly disclaimed and excluded by RENESAS,
//either expressed or implied, including but not limited to those for
//non-infringement of intellectual property, merchantability and/or
//fitness for the particular purpose.
//RENESAS shall not have any obligation to maintain, service or provide bug
//fixes for the supplied Product(s) and/or the Application.
//
//Each User is solely responsible for determining the appropriateness of
//using the Product(s) and assumes all risks associated with its exercise
//of rights under this Agreement, including, but not limited to the risks
//and costs of program errors, compliance with applicable laws, damage to
//or loss of data, programs or equipment, and unavailability or
//interruption of operations.
//
//Limitation of Liability
//
//In no event shall RENESAS be liable to the User for any incidental,
//consequential, indirect, or punitive damage (including but not limited
//to lost profits) regardless of whether such liability is based on breach
//of contract, tort, strict liability, breach of warranties, failure of
//essential purpose or otherwise and even if advised of the possibility of
//such damages. RENESAS shall not be liable for any services or products
//provided by third party vendors, developers or consultants identified or
//referred to the User by RENESAS in connection with the Product(s) and/or the
//Application.
//
//
//
//============================================================================
// Environment: Devices: All featuring RSCFDFD_UCIAPRCN_V4
// Assembler: GHS MULTI
// C-Compiler: GHS MULTI
// Linker: GHS MULTI
// Debugger: GHS MULTI
//============================================================================
#ifndef RSCFD_S_H
#define RSCFD_S_H
#define DRIVER_LOCAL
#include <stddef.h>
#include <ree_types.h>
#include <map_rscfd.h>
#define RSCFD_A_COMFIFO_OFF { 0, 0, 0, 0, \
RSCFD_FIFODL_8, 0, \
RSCFD_FIFO_MODE_RX, \
RSCFD_FIFO_IT_REFCLK, \
RSCFD_FIFO_IT_REFCLK1, \
RSCFD_FIFO_INT_ONLEVEL, \
RSCFD_FIFO_ILEVEL_1D8, \
0, \
RSCFD_FIFO_DEPTH_0, \
0 } /* COM FIFO disabled */
#define RSCFD_A_COMFIFO_STD { 0, 0, 0, 0, \
RSCFD_COM_FIFO_DSCMODE, 0, \
0, 0 } /* COM FIFO in legacy use mode */
#define RSCFD_A_RXFIFO_OFF { 0, 0, 0, \
RSCFD_FIFODL_8, 0, \
RSCFD_FIFO_DEPTH_0, 0, \
RSCFD_FIFO_INT_ONLEVEL, \
RSCFD_FIFO_ILEVEL_1D8, \
0, 0 } /* RX FIFO disabled */
#define RSCFD_A_RXFIFO_SWGW { 0, 0, 0, \
RSCFD_FIFODL_64, 0, \
RSCFD_FIFO_DEPTH_4, 0, \
RSCFD_FIFO_INT_ONEVERY, \
RSCFD_FIFO_ILEVEL_1D8, \
0, 0 } /* RX FIFO for DMA enabled with 64-byte*32 */
#define RSCFD_A_RXFIFO_CTRL { 0, 1, 0, \
RSCFD_FIFODL_64, 0, \
RSCFD_FIFO_DEPTH_4, 0, \
RSCFD_FIFO_INT_ONEVERY, \
RSCFD_FIFO_ILEVEL_1D8, \
0, 0 } /* RX FIFO enabled with 64-byte*4 */
/* 500 kbit/s - 4 Mbit/s CAN-FD operation with 80% sampling point position (SP and SSP) */
{
RSCFD_TXPRIO_ID, /* TX priority by ID (standard) */
RSCFD_DLCCHECK_DISABLE,
RSCFD_DLCREPL_DISABLE, /* no DLC check or replacement */
RSCFD_MIRROR_ENABLE, /* Mirror Mode */
RSCFD_CLOCK_SYS, /* use peripheral clock */
RSCFD_PLOVF_TRUNCATE, 0, /* larger messages than buffer are truncated */
0, RSCFD_CLOCK_TSBIT,
RSCFD_CHANNEL0, /* Use 1TQ Bit-Timing clock 0 for Timestamps */
RSCFD_CLOCK_FIFO_OFF /* interval timer of FIFO disabled */
},
{
RSCFD_OPMODE_KEEP,
RSCFD_SLEEP_DISABLE, 0, /* No implicit change of Operation Mode */
RSCFD_GINT_MSGLOST | /* Error Interrupts: RX FIFO overflow */
RSCFD_GINT_GWTXQLOST, /* TX Queue overflow (too many different ID) */
RSCFD_TIMESTAMP_KEEP, 0 /* Timestamp is not written by software */
},
{
RSCFD_PROTEXCEVENT_EN, 0, /* enable protocol exception event handling */
RSCFD_TSCAPTURE_SOF, 0 /* timestamp capture performed at SOF bit */
},
{
1, /* use 1 classical RX buffer for monitoring */
RSCFD_BUFDL_64, 0 /* full 64-byte size of classical RX buffer */
},
{
2, 0, 2, 0, 2, 0, 2, 0 /* channel AFL entries */
},
{
RSCFD_A_RXFIFO_SWGW, /* enable RX FIFO 0 */
RSCFD_A_RXFIFO_SWGW, /* enable RX FIFO 1 */
RSCFD_A_RXFIFO_SWGW, /* enable RX FIFO 2 */
RSCFD_A_RXFIFO_SWGW, /* enable RX FIFO 3 */
RSCFD_A_RXFIFO_CTRL, /* enable RX FIFO 4 */
RSCFD_A_RXFIFO_OFF,
RSCFD_A_RXFIFO_OFF,
RSCFD_A_RXFIFO_OFF
},
{ /* select DMA functions */
RSCFD_DMA_RXF0 | RSCFD_DMA_RXF1 | /* RX DMA of RXFIFO 0~3 */
RSCFD_DMA_RXF2 | RSCFD_DMA_RXF3,
RSCFD_DMA_ALLOFF, 0 /* No RX DMA of COMFIFO */
},
{
RSCFD_DMA_ALLOFF, /* No TX DMA of TXQ 0 */
( 1 << RSCFD_CHANNEL0 ) | /* TX DMA of CH0/2/4/6 TXQ 3 */
( 1 << RSCFD_CHANNEL2 ) |
( 1 << RSCFD_CHANNEL4 ) |
( 1 << RSCFD_CHANNEL6 ),
RSCFD_DMA_ALLOFF, 0 /* No TX DMA of COMFIFO */
},
{
RSCFD_FLEXCAN_OFF, 0 /* Flexible CAN Mode off */
},
{ /* No movement of TX Boxes */
RSCFD_FLEXBUF_NONE, 0,
RSCFD_FLEXBUF_NONE, 0,
RSCFD_FLEXBUF_NONE, 0,
RSCFD_FLEXBUF_NONE, 0
}
};
{
0x0000000, /* not relevant */
RSCFD_AFL_RXENTRY, /* receive entry type of AFL */
RSCFD_FRAME_DATA, /* RTR data frame configuration */
RSCFD_ID_STD /* standard frame configuration */
},
{
RSCFD_MASK_IDDONTCARE, /* mask is receiving all messages */
RSCFD_AFL_IFL1_MASK( 0L ), /* upper bit of IFL flag */
RSCFD_MASK_FILTER, /* only standard ID data frames */
RSCFD_MASK_FILTER
},
{
RSCFD_DLCCHECK_DISABLE, /* to enable DLC check, enter DLC here */
RSCFD_AFL_SRD_TOTXQ, /* routing to TX-Queues is set */
RSCFD_AFL_SRD_TOTXQ,
RSCFD_AFL_SRD_TOTXQ,
RSCFD_AFL_IFL0_MASK( 0L ), /* lower bit of IFL flag */
0, /* RX Box Number - not relevant for FIFO */
RSCFD_SET, /* RX Box 0 is set active */
0x0000 /* Receive HRH pointer - to be replaced with actual value */
},
{
RSCFD_AFL_RXFIF0_EN0, /* assigned RX-FIFO 0 */
RSCFD_AFL_FIFOTXQ_C2E0 | /* TX-QUEUES 0 of channels 2,4,6 */
RSCFD_AFL_FIFOTXQ_C4E0 |
RSCFD_AFL_FIFOTXQ_C6E0
}
};
{
0x0000000, /* not relevant */
RSCFD_AFL_RXENTRY, /* receive entry type of AFL */
RSCFD_FRAME_DATA, /* RTR data frame configuration */
RSCFD_ID_STD /* standard frame configuration */
},
{
RSCFD_MASK_IDDONTCARE, /* mask is receiving all messages */
RSCFD_AFL_IFL1_MASK( 0L ), /* upper bit of IFL flag */
RSCFD_MASK_FILTER, /* only standard ID data frames */
RSCFD_MASK_FILTER
},
{
RSCFD_DLCCHECK_DISABLE, /* to enable DLC check, enter DLC here */
RSCFD_AFL_SRD_TOTXQ, /* routing to TX-Queues is set */
RSCFD_AFL_SRD_TOTXQ,
RSCFD_AFL_SRD_TOTXQ,
RSCFD_AFL_IFL0_MASK( 1L ), /* lower bit of IFL flag */
0, /* RX Box Number - not relevant for FIFO */
RSCFD_CLEAR, /* RX Box is set inactive */
0x0000 /* Receive HRH pointer - to be replaced with actual value */
},
{
RSCFD_AFL_RXFIF0_EN1, /* assigned RX-FIFO 1 */
RSCFD_AFL_FIFOTXQ_C0E0 | /* TX-QUEUES 0/1 of channels 2,4,6 */
RSCFD_AFL_FIFOTXQ_C4E1 |
RSCFD_AFL_FIFOTXQ_C6E1
}
};
{
0x0000000, /* not relevant */
RSCFD_AFL_RXENTRY, /* receive entry type of AFL */
RSCFD_FRAME_DATA, /* RTR data frame configuration */
RSCFD_ID_STD /* standard frame configuration */
},
{
RSCFD_MASK_IDDONTCARE, /* mask is receiving all messages */
RSCFD_AFL_IFL1_MASK( 1L ), /* upper bit of IFL flag */
RSCFD_MASK_FILTER, /* only standard ID data frames */
RSCFD_MASK_FILTER
},
{
RSCFD_DLCCHECK_DISABLE, /* to enable DLC check, enter DLC here */
RSCFD_AFL_SRD_TOTXQ, /* routing to TX-Queues is set */
RSCFD_AFL_SRD_TOTXQ,
RSCFD_AFL_SRD_TOTXQ,
RSCFD_AFL_IFL0_MASK( 0L ), /* lower bit of IFL flag */
0, /* RX Box Number - not relevant for FIFO */
RSCFD_CLEAR, /* RX Box is set inactive */
0x0000 /* Receive HRH pointer - to be replaced with actual value */
},
{
RSCFD_AFL_RXFIF0_EN2, /* assigned RX-FIFO 2 */
RSCFD_AFL_FIFOTXQ_C0E0 | /* TX-QUEUES 0/1/2 of channels 2,4,6 */
RSCFD_AFL_FIFOTXQ_C2E1 |
RSCFD_AFL_FIFOTXQ_C6E2
}
};
{
0x0000000, /* not relevant */
RSCFD_AFL_RXENTRY, /* receive entry type of AFL */
RSCFD_FRAME_DATA, /* RTR data frame configuration */
RSCFD_ID_STD /* standard frame configuration */
},
{
RSCFD_MASK_IDDONTCARE, /* mask is receiving all messages */
RSCFD_AFL_IFL1_MASK( 1L ), /* upper bit of IFL flag */
RSCFD_MASK_FILTER, /* only standard ID data frames */
RSCFD_MASK_FILTER
},
{
RSCFD_DLCCHECK_DISABLE, /* to enable DLC check, enter DLC here */
RSCFD_AFL_SRD_TOTXQ, /* routing to TX-Queues is set */
RSCFD_AFL_SRD_TOTXQ,
RSCFD_AFL_SRD_TOTXQ,
RSCFD_AFL_IFL0_MASK( 1L ), /* lower bit of IFL flag */
0, /* RX Box Number - not relevant for FIFO */
RSCFD_CLEAR, /* RX Box is set inactive */
0x0000 /* Receive HRH pointer - to be replaced with actual value */
},
{
RSCFD_AFL_RXFIF0_EN3, /* assigned RX-FIFO 3 */
RSCFD_AFL_FIFOTXQ_C0E2 | /* TX-QUEUES 2 of channels 2,4,6 */
RSCFD_AFL_FIFOTXQ_C2E2 |
RSCFD_AFL_FIFOTXQ_C4E2
}
};
{
0x0000000, /* Extended ID 0x00000000 to be received only */
RSCFD_AFL_RXENTRY, /* receive entry type of AFL */
RSCFD_FRAME_DATA, /* RTR data frame configuration */
RSCFD_ID_EXT /* extended frame configuration */
},
{
RSCFD_MASK_IDFULLCAN, /* mask is filtering exact match */
RSCFD_AFL_IFL1_MASK( 0L ), /* upper bit of IFL flag */
RSCFD_MASK_FILTER, /* only extended ID data frames */
RSCFD_MASK_FILTER
},
{
RSCFD_DLCCHECK_DISABLE, /* to enable DLC check, enter DLC here */
RSCFD_AFL_SRD_TOCF, /* routing to COMFIFO is default */
RSCFD_AFL_SRD_TOCF,
RSCFD_AFL_SRD_TOCF,
RSCFD_AFL_IFL0_MASK( 0L ), /* lower bit of IFL flag */
0, /* RX Box Number 0 */
RSCFD_CLEAR, /* No RX Box is set */
0x0000 /* Receive HRH pointer - to be replaced with actual value */
},
{
RSCFD_AFL_RXFIF0_EN4, /* RX-FIFO 4 is used */
RSCFD_AFL_COMFIFO_NONE /* COM-FIFO is not used */
}
};
#endif
//============================================================================
// PROJECT = Mutli-Gateway for U2A on X2X NETWORK BOARD
//============================================================================
// C O P Y R I G H T
//============================================================================
// Copyright (c) 2020 by Renesas Electronics (Europe) GmbH. All rights reserved.
// Arcadiastrasse 10
// D-40472 Duesseldorf
// Germany
//============================================================================
//
//Warranty Disclaimer
//
//Because the Product(s) is licensed free of charge, there is no warranty
//of any kind whatsoever and expressly disclaimed and excluded by Renesas,
//either expressed or implied, including but not limited to those for
//non-infringement of intellectual property, merchantability and/or
//fitness for the particular purpose.
//Renesas shall not have any obligation to maintain, service or provide bug
//fixes for the supplied Product(s) and/or the Application.
//
//Each User is solely responsible for determining the appropriateness of
//using the Product(s) and assumes all risks associated with its exercise
//of rights under this Agreement, including, but not limited to the risks
//and costs of program errors, compliance with applicable laws, damage to
//or loss of data, programs or equipment, and unavailability or
//interruption of operations.
//
//Limitation of Liability
//
//In no event shall Renesas be liable to the User for any incidental,
//consequential, indirect, or punitive damage (including but not limited
//to lost profits) regardless of whether such liability is based on breach
//of contract, tort, strict liability, breach of warranties, failure of
//essential purpose or otherwise and even if advised of the possibility of
//such damages. Renesas shall not be liable for any services or products
//provided by third party vendors, developers or consultants identified or
//referred to the User by Renesas in connection with the Product(s) and/or the
//Application.
//
//
//
//============================================================================
// Environment: Devices: RH850/U2A on X2X NETWORK BOARD
// Assembler: GHS MULTI
// C-Compiler: GHS MULTI
// Linker: GHS MULTI
// Debugger: GHS MULTI
//============================================================================
/*
+------------------------------------------------------------------------------+
| Includes |
+------------------------------------------------------------------------------+
*/
#include <map_device.h>
#include <map_ports.h>
#include <map_rscfd.h>
#include <map_dma.h>
#include <map_asmn.h>
#include <stdlib.h>
#include "rscfd_s.h"
#define CAN_A_MACHINES ( 16 )
#define CAN_A_UNIT( M ) ( ( M>=8 ? 1 : 0 ) )
#define CAN_A_CHANNEL( M ) ( ( M>=8 ? ( M % 8 ) : M ) )
#define CAN_A_MACHINE( U, C ) ( U * 8 + C )
#define PBG32PROT0_13 *( ( volatile unsigned long *)( 0xffc72d00+0x00000068 ) )/* RS-CANFD1, CAN0 */
#define PBG32PROT0_14 *( ( volatile unsigned long *)( 0xffc72d00+0x00000070 ) )/* RS-CANFD1, CAN1 */
#define PBG32PROT0_15 *( ( volatile unsigned long *)( 0xffc72d00+0x00000078 ) )/* RS-CANFD1, CAN2 */
#define PBG33PROT0_0 *( ( volatile unsigned long *)( 0xffc72e00+0x00000000 ) )/* RS-CANFD1, CAN3 */
#define PBG33PROT0_1 *( ( volatile unsigned long *)( 0xffc72e00+0x00000008 ) )/* RS-CANFD1, CAN4 */
#define PBG33PROT0_2 *( ( volatile unsigned long *)( 0xffc72e00+0x00000010 ) )/* RS-CANFD1, CAN5 */
#define PBG33PROT0_3 *( ( volatile unsigned long *)( 0xffc72e00+0x00000018 ) )/* RS-CANFD1, CAN6 */
#define PBG33PROT0_4 *( ( volatile unsigned long *)( 0xffc72e00+0x00000020 ) )/* RS-CANFD1, CAN7 */
#define PBG33PROT0_5 *( ( volatile unsigned long *)( 0xffc72e00+0x00000028 ) )/* RS-CANFD1, COM */
#define PBG32PROT1_13 *( ( volatile unsigned long *)( 0xffc72d00+0x0000006c ) )/* RS-CANFD1, CAN0 */
#define PBG32PROT1_14 *( ( volatile unsigned long *)( 0xffc72d00+0x00000074 ) )/* RS-CANFD1, CAN1 */
#define PBG32PROT1_15 *( ( volatile unsigned long *)( 0xffc72d00+0x0000007c ) )/* RS-CANFD1, CAN2 */
#define PBG33PROT1_0 *( ( volatile unsigned long *)( 0xffc72e00+0x00000004 ) )/* RS-CANFD1, CAN3 */
#define PBG33PROT1_1 *( ( volatile unsigned long *)( 0xffc72e00+0x0000000c ) )/* RS-CANFD1, CAN4 */
#define PBG33PROT1_2 *( ( volatile unsigned long *)( 0xffc72e00+0x00000014 ) )/* RS-CANFD1, CAN5 */
#define PBG33PROT1_3 *( ( volatile unsigned long *)( 0xffc72e00+0x0000001c ) )/* RS-CANFD1, CAN6 */
#define PBG33PROT1_4 *( ( volatile unsigned long *)( 0xffc72e00+0x00000024 ) )/* RS-CANFD1, CAN7 */
#define PBG33PROT1_5 *( ( volatile unsigned long *)( 0xffc72e00+0x0000002c ) )/* RS-CANFD1, COM */
#define PBG80PROT0_2 *( ( volatile unsigned long *)( 0xfff29300+0x00000010 ) )/* RS-CANFD0, CAN0 */
#define PBG80PROT0_3 *( ( volatile unsigned long *)( 0xfff29300+0x00000018 ) )/* RS-CANFD0, CAN1 */
#define PBG80PROT0_4 *( ( volatile unsigned long *)( 0xfff29300+0x00000020 ) )/* RS-CANFD0, CAN2 */
#define PBG80PROT0_5 *( ( volatile unsigned long *)( 0xfff29300+0x00000028 ) )/* RS-CANFD0, CAN3 */
#define PBG80PROT0_6 *( ( volatile unsigned long *)( 0xfff29300+0x00000030 ) )/* RS-CANFD0, CAN4 */
#define PBG80PROT0_7 *( ( volatile unsigned long *)( 0xfff29300+0x00000038 ) )/* RS-CANFD0, CAN5 */
#define PBG80PROT0_8 *( ( volatile unsigned long *)( 0xfff29300+0x00000040 ) )/* RS-CANFD0, CAN6 */
#define PBG80PROT0_9 *( ( volatile unsigned long *)( 0xfff29300+0x00000048 ) )/* RS-CANFD0, CAN7 */
#define PBG80PROT0_10 *( ( volatile unsigned long *)( 0xfff29300+0x00000050 ) )/* RS-CANFD0, COM */
#define PBG80PROT1_2 *( ( volatile unsigned long *)( 0xfff29300+0x00000014 ) )/* RS-CANFD0, CAN0 */
#define PBG80PROT1_3 *( ( volatile unsigned long *)( 0xfff29300+0x0000001c ) )/* RS-CANFD0, CAN1 */
#define PBG80PROT1_4 *( ( volatile unsigned long *)( 0xfff29300+0x00000024 ) )/* RS-CANFD0, CAN2 */
#define PBG80PROT1_5 *( ( volatile unsigned long *)( 0xfff29300+0x0000002c ) )/* RS-CANFD0, CAN3 */
#define PBG80PROT1_6 *( ( volatile unsigned long *)( 0xfff29300+0x00000034 ) )/* RS-CANFD0, CAN4 */
#define PBG80PROT1_7 *( ( volatile unsigned long *)( 0xfff29300+0x0000003c ) )/* RS-CANFD0, CAN5 */
#define PBG80PROT1_8 *( ( volatile unsigned long *)( 0xfff29300+0x00000044 ) )/* RS-CANFD0, CAN6 */
#define PBG80PROT1_9 *( ( volatile unsigned long *)( 0xfff29300+0x0000004c ) )/* RS-CANFD0, CAN7 */
#define PBG80PROT1_10 *( ( volatile unsigned long *)( 0xfff29300+0x00000054 ) )/* RS-CANFD0, COM */
//============================================================================
// PROJECT = Mutli-Gateway for U2A on X2X NETWORK BOARD
//============================================================================
// C O P Y R I G H T
//============================================================================
// Copyright (c) 2020 by Renesas Electronics (Europe) GmbH. All rights reserved.
// Arcadiastrasse 10
// D-40472 Duesseldorf
// Germany
//============================================================================
//
//Warranty Disclaimer
//
//Because the Product(s) is licensed free of charge, there is no warranty
//of any kind whatsoever and expressly disclaimed and excluded by Renesas,
//either expressed or implied, including but not limited to those for
//non-infringement of intellectual property, merchantability and/or
//fitness for the particular purpose.
//Renesas shall not have any obligation to maintain, service or provide bug
//fixes for the supplied Product(s) and/or the Application.
//
//Each User is solely responsible for determining the appropriateness of
//using the Product(s) and assumes all risks associated with its exercise
//of rights under this Agreement, including, but not limited to the risks
//and costs of program errors, compliance with applicable laws, damage to
//or loss of data, programs or equipment, and unavailability or
//interruption of operations.
//
//Limitation of Liability
//
//In no event shall Renesas be liable to the User for any incidental,
//consequential, indirect, or punitive damage (including but not limited
//to lost profits) regardless of whether such liability is based on breach
//of contract, tort, strict liability, breach of warranties, failure of
//essential purpose or otherwise and even if advised of the possibility of
//such damages. Renesas shall not be liable for any services or products
//provided by third party vendors, developers or consultants identified or
//referred to the User by Renesas in connection with the Product(s) and/or the
//Application.
//
//
//
//============================================================================
// Environment: Devices: RH850/U2A on X2X NETWORK BOARD
// Assembler: GHS MULTI
// C-Compiler: GHS MULTI
// Linker: GHS MULTI
// Debugger: GHS MULTI
//============================================================================
#include "Multi_Gateway_Test.h"
/*
+------------------------------------------------------------------------------+
| Globals |
+------------------------------------------------------------------------------+
*/
/* Global Error of Unit: RX-FIFO Overflow and TXQ Overflow (not handled) */
RSCFD_GetError( RSCFD_InterruptFlag_Unit_u08,
RSCFD_GLOBAL,
&InterruptErrorFlag_u16,
&LastErrorFlag_u16 );
Unit_u08 = RSCFD_InterruptFlag_Unit_u08;
do
{
InMessage.path = RSCFD_PATH_RXFIFO;
InMessage.pathdetail = 4;
return;
}
for( Machine_u08 = 0;
Machine_u08 < CAN_A_MACHINES;
Machine_u08++ )
{
Unit_u08 = CAN_A_UNIT( Machine_u08 );
Channel_u08 = CAN_A_CHANNEL( Machine_u08 );
switch( Channel_u08 )
{
case RSCFD_CHANNEL0:
Status_bit &= RSCFD_SetAFLEntry( Unit_u08,
Channel_u08,
0,
&RSCFD_A_AFL_CH0 );
Status_bit &= RSCFD_SetAFLEntry( Unit_u08,
Channel_u08,
1,
&RSCFD_A_AFL_RXBOX_EXTID_GWEXIT );
break;
case RSCFD_CHANNEL2:
Status_bit &= RSCFD_SetAFLEntry( Unit_u08,
Channel_u08,
0,
&RSCFD_A_AFL_CH2 );
Status_bit &= RSCFD_SetAFLEntry( Unit_u08,
Channel_u08,
1,
&RSCFD_A_AFL_RXBOX_EXTID_GWEXIT );
break;
case RSCFD_CHANNEL4:
Status_bit &= RSCFD_SetAFLEntry( Unit_u08,
Channel_u08,
0,
&RSCFD_A_AFL_CH4 );
Status_bit &= RSCFD_SetAFLEntry( Unit_u08,
Channel_u08,
1,
&RSCFD_A_AFL_RXBOX_EXTID_GWEXIT );
break;
case RSCFD_CHANNEL6:
Status_bit &= RSCFD_SetAFLEntry( Unit_u08,
Channel_u08,
0,
&RSCFD_A_AFL_CH6 );
Status_bit &= RSCFD_SetAFLEntry( Unit_u08,
Channel_u08,
1,
&RSCFD_A_AFL_RXBOX_EXTID_GWEXIT );
break;
}
}
return( Status_bit );
}
for( Machine_u08 = 0;
Machine_u08 < CAN_A_MACHINES;
Machine_u08++ )
{
Unit_u08 = CAN_A_UNIT( Machine_u08 );
Channel_u08 = CAN_A_CHANNEL( Machine_u08 );
switch( Channel_u08 )
{
case RSCFD_CHANNEL0:
case RSCFD_CHANNEL2:
case RSCFD_CHANNEL4:
case RSCFD_CHANNEL6:
Status_bit &= RSCFD_SetChannelConfiguration( Unit_u08,
Channel_u08,
&RSCFD_A_CHHWGW_500_KBPS_4000KBPS );
Status_bit &= RSCFD_Start( Unit_u08,
Channel_u08,
RSCFD_OPMODE_OPER, /* operation mode */
RSCFD_CLEAR, /* no error clearing */
RSCFD_SET ); /* timestamp reset */
break;
case RSCFD_CHANNEL1:
case RSCFD_CHANNEL3:
case RSCFD_CHANNEL5:
case RSCFD_CHANNEL7:
Status_bit &= RSCFD_SetChannelConfiguration( Unit_u08,
Channel_u08,
&RSCFD_A_CHRECONLY_500_KBPS_4000KBPS );
Status_bit &= RSCFD_Start( Unit_u08,
Channel_u08,
RSCFD_OPMODE_OPER, /* operation mode */
RSCFD_CLEAR, /* no error clearing */
RSCFD_SET ); /* timestamp reset */
break;
}
}
return( Status_bit );
}
/* open a PBG channel per CAN channel for the SDMAC controller */
PBGKCPROT30 = 0xA5A5A501L;
PBG32PROT0_13 = 0x00000153L; /* r/w RS-CANFD1, CAN0 */
PBG32PROT1_13 |= ( 1 << 0x1C ); /* Default SPID of SDMAC0 */
PBG32PROT0_15 = 0x00000153L; /* r/w RS-CANFD1, CAN2 */
PBG32PROT1_15 |= ( 1 << 0x1C ); /* Default SPID of SDMAC0 */
PBG33PROT0_1 = 0x00000153L; /* r/w RS-CANFD1, CAN4 */
PBG33PROT1_1 |= ( 1 << 0x1C ); /* Default SPID of SDMAC0 */
PBG33PROT0_3 = 0x00000153L; /* r/w RS-CANFD1, CAN6 */
PBG33PROT1_3 |= ( 1 << 0x1C ); /* Default SPID of SDMAC0 */
PBG33PROT0_5 = 0x00000153L; /* r/w RS-CANFD1, COMMON (RX-FIFO) */
PBG33PROT1_5 |= ( 1 << 0x1C ); /* Default SPID of SDMAC0 */
PBGKCPROT80 = 0xA5A5A501L;
PBG80PROT0_2 = 0x00000153L; /* r/w RS-CANFD0, CAN0 */
PBG80PROT1_2 |= ( 1 << 0x1C ); /* Default SPID of SDMAC0 */
PBG80PROT0_4 = 0x00000153L; /* r/w RS-CANFD0, CAN2 */
PBG80PROT1_4 |= ( 1 << 0x1C ); /* Default SPID of SDMAC0 */
PBG80PROT0_6 = 0x00000153L; /* r/w RS-CANFD0, CAN4 */
PBG80PROT1_6 |= ( 1 << 0x1C ); /* Default SPID of SDMAC0 */
PBG80PROT0_8 = 0x00000153L; /* r/w RS-CANFD0, CAN6 */
PBG80PROT1_8 |= ( 1 << 0x1C ); /* Default SPID of SDMAC0 */
PBG80PROT0_10 = 0x00000153L; /* r/w RS-CANFD0, COMMON (RX-FIFO) */
PBG80PROT1_10 |= ( 1 << 0x1C ); /* Default SPID of SDMAC0 */
GUARD_PE0CL0PEGKCPROT = 0xA5A5A501L;
GUARD_PE0CL0PEGSPID0 = ( 1 << 0x1C ); /* Default SPID of SDMAC0 */
GUARD_PE0CL0PEGBAD0 = 0xFDC00000L; /* local RAM base address */
GUARD_PE0CL0PEGADV0 = 0x03FF0000L; /* 64K local RAM is open */
GUARD_PE0CL0PEGPROT0 = 0x00000150L; /* enable guard */
/* Master settings */
SDMA_ChannelCfg[ 0 ].cm.um = SDMAC_CLEAR; /* Supervisor Mode */
SDMA_ChannelCfg[ 0 ].cm.spid = 0x1C; /* Default SPID */
/* Transfer settings */
SDMA_ChannelCfg[ 0 ].tsr = 0L; /* Force the descriptor usage */
SDMA_ChannelCfg[ 0 ].tmr.b.sts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 0 ].tmr.b.dts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 0 ].tmr.b.sm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 0 ].tmr.b.dm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 0 ].tmr.b.trs = SDMAC_REQUESTSOURCE_HARDWARE;
SDMA_ChannelCfg[ 0 ].tmr.b.pri = 0L;
SDMA_ChannelCfg[ 0 ].tmr.b.prien = 0L;
SDMA_ChannelCfg[ 0 ].tmr.b.slm = SDMAC_SLOWSPEED_OFF;
SDMA_ChannelCfg[ 0 ].sgcr.b.gen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 0 ].sgcr.b.sen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 0 ].rs.b.drqi = SDMAC_CLEAR;
SDMA_ChannelCfg[ 0 ].rs.b.ple = SDMAC_CLEAR;
SDMA_ChannelCfg[ 0 ].rs.b.fpt = SDMAC_CLEAR;
SDMA_ChannelCfg[ 0 ].rs.b.tl = SDMAC_TRLIMIT_BY_STS_TC;
SDMA_ChannelCfg[ 0 ].rs.b.tc = 19L * 5;
SDMA_ChannelCfg[ 0 ].chcr.dpb = SDMAC_CLEAR;
SDMA_ChannelCfg[ 0 ].chcr.dpe = SDMAC_SET;
SDMA_ChannelCfg[ 0 ].bufcr.b.ulb = SDMAC_BUFFERLIMIT_DEFAULT;
SDMA_ChannelCfg[ 0 ].dpptr.cf = SDMAC_SET;
SDMA_ChannelCfg[ 0 ].dpptr.ptr = ( FirstDescriptorPointer_u32[ 0 ] ) >> 2;
SDMA_ChannelCfg[ 0 ].dpcr.upf = ( SDMAC_DESCUPDATEFLAG_SAR |
SDMAC_DESCUPDATEFLAG_DAR |
SDMAC_DESCUPDATEFLAG_TSR );
/* Master settings */
SDMA_ChannelCfg[ 1 ].cm.um = SDMAC_CLEAR; /* Supervisor Mode */
SDMA_ChannelCfg[ 1 ].cm.spid = 0x1C; /* Default SPID */
/* Transfer settings */
SDMA_ChannelCfg[ 1 ].tsr = 0L; /* Force the descriptor usage */
SDMA_ChannelCfg[ 1 ].tmr.b.sts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 1 ].tmr.b.dts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 1 ].tmr.b.sm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 1 ].tmr.b.dm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 1 ].tmr.b.trs = SDMAC_REQUESTSOURCE_HARDWARE;
SDMA_ChannelCfg[ 1 ].tmr.b.pri = 0L;
SDMA_ChannelCfg[ 1 ].tmr.b.prien = 0L;
SDMA_ChannelCfg[ 1 ].tmr.b.slm = SDMAC_SLOWSPEED_OFF;
SDMA_ChannelCfg[ 1 ].sgcr.b.gen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 1 ].sgcr.b.sen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 1 ].rs.b.drqi = SDMAC_CLEAR;
SDMA_ChannelCfg[ 1 ].rs.b.ple = SDMAC_CLEAR;
SDMA_ChannelCfg[ 1 ].rs.b.fpt = SDMAC_CLEAR;
SDMA_ChannelCfg[ 1 ].rs.b.tl = SDMAC_TRLIMIT_BY_STS_TC;
SDMA_ChannelCfg[ 1 ].rs.b.tc = 19L * 5;
SDMA_ChannelCfg[ 1 ].chcr.dpb = SDMAC_CLEAR;
SDMA_ChannelCfg[ 1 ].chcr.dpe = SDMAC_SET;
SDMA_ChannelCfg[ 1 ].bufcr.b.ulb = SDMAC_BUFFERLIMIT_DEFAULT;
SDMA_ChannelCfg[ 1 ].dpptr.cf = SDMAC_SET;
SDMA_ChannelCfg[ 1 ].dpptr.ptr = ( FirstDescriptorPointer_u32[ 1 ] ) >> 2;
SDMA_ChannelCfg[ 1 ].dpcr.upf = ( SDMAC_DESCUPDATEFLAG_SAR |
SDMAC_DESCUPDATEFLAG_DAR |
SDMAC_DESCUPDATEFLAG_TSR );
/* Master settings */
SDMA_ChannelCfg[ 2 ].cm.um = SDMAC_CLEAR; /* Supervisor Mode */
SDMA_ChannelCfg[ 2 ].cm.spid = 0x1C; /* Default SPID */
/* Transfer settings */
SDMA_ChannelCfg[ 2 ].tsr = 0L; /* Force the descriptor usage */
SDMA_ChannelCfg[ 2 ].tmr.b.sts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 2 ].tmr.b.dts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 2 ].tmr.b.sm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 2 ].tmr.b.dm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 2 ].tmr.b.trs = SDMAC_REQUESTSOURCE_HARDWARE;
SDMA_ChannelCfg[ 2 ].tmr.b.pri = 0L;
SDMA_ChannelCfg[ 2 ].tmr.b.prien = 0L;
SDMA_ChannelCfg[ 2 ].tmr.b.slm = SDMAC_SLOWSPEED_OFF;
SDMA_ChannelCfg[ 2 ].sgcr.b.gen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 2 ].sgcr.b.sen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 2 ].rs.b.drqi = SDMAC_CLEAR;
SDMA_ChannelCfg[ 2 ].rs.b.ple = SDMAC_CLEAR;
SDMA_ChannelCfg[ 2 ].rs.b.fpt = SDMAC_CLEAR;
SDMA_ChannelCfg[ 2 ].rs.b.tl = SDMAC_TRLIMIT_BY_STS_TC;
SDMA_ChannelCfg[ 2 ].rs.b.tc = 19L * 5;
SDMA_ChannelCfg[ 2 ].chcr.dpb = SDMAC_CLEAR;
SDMA_ChannelCfg[ 2 ].chcr.dpe = SDMAC_SET;
SDMA_ChannelCfg[ 2 ].bufcr.b.ulb = SDMAC_BUFFERLIMIT_DEFAULT;
SDMA_ChannelCfg[ 2 ].dpptr.cf = SDMAC_SET;
SDMA_ChannelCfg[ 2 ].dpptr.ptr = ( FirstDescriptorPointer_u32[ 2 ] ) >> 2;
SDMA_ChannelCfg[ 2 ].dpcr.upf = ( SDMAC_DESCUPDATEFLAG_SAR |
SDMAC_DESCUPDATEFLAG_DAR |
SDMAC_DESCUPDATEFLAG_TSR );
/* Master settings */
SDMA_ChannelCfg[ 3 ].cm.um = SDMAC_CLEAR; /* Supervisor Mode */
SDMA_ChannelCfg[ 3 ].cm.spid = 0x1C; /* Default SPID */
/* Transfer settings */
SDMA_ChannelCfg[ 3 ].tsr = 0L; /* Force the descriptor usage */
SDMA_ChannelCfg[ 3 ].tmr.b.sts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 3 ].tmr.b.dts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 3 ].tmr.b.sm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 3 ].tmr.b.dm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 3 ].tmr.b.trs = SDMAC_REQUESTSOURCE_HARDWARE;
SDMA_ChannelCfg[ 3 ].tmr.b.pri = 0L;
SDMA_ChannelCfg[ 3 ].tmr.b.prien = 0L;
SDMA_ChannelCfg[ 3 ].tmr.b.slm = SDMAC_SLOWSPEED_OFF;
SDMA_ChannelCfg[ 3 ].sgcr.b.gen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 3 ].sgcr.b.sen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 3 ].rs.b.drqi = SDMAC_CLEAR;
SDMA_ChannelCfg[ 3 ].rs.b.ple = SDMAC_CLEAR;
SDMA_ChannelCfg[ 3 ].rs.b.fpt = SDMAC_CLEAR;
SDMA_ChannelCfg[ 3 ].rs.b.tl = SDMAC_TRLIMIT_BY_STS_TC;
SDMA_ChannelCfg[ 3 ].rs.b.tc = 19L * 5;
SDMA_ChannelCfg[ 3 ].chcr.dpb = SDMAC_CLEAR;
SDMA_ChannelCfg[ 3 ].chcr.dpe = SDMAC_SET;
SDMA_ChannelCfg[ 3 ].bufcr.b.ulb = SDMAC_BUFFERLIMIT_DEFAULT;
SDMA_ChannelCfg[ 3 ].dpptr.cf = SDMAC_SET;
SDMA_ChannelCfg[ 3 ].dpptr.ptr = ( FirstDescriptorPointer_u32[ 3 ] ) >> 2;
SDMA_ChannelCfg[ 3 ].dpcr.upf = ( SDMAC_DESCUPDATEFLAG_SAR |
SDMAC_DESCUPDATEFLAG_DAR |
SDMAC_DESCUPDATEFLAG_TSR );
/* Master settings */
SDMA_ChannelCfg[ 4 ].cm.um = SDMAC_CLEAR; /* Supervisor Mode */
SDMA_ChannelCfg[ 4 ].cm.spid = 0x1C; /* Default SPID */
/* Transfer settings */
SDMA_ChannelCfg[ 4 ].tsr = 0L; /* Force the descriptor usage */
SDMA_ChannelCfg[ 4 ].tmr.b.sts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 4 ].tmr.b.dts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 4 ].tmr.b.sm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 4 ].tmr.b.dm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 4 ].tmr.b.trs = SDMAC_REQUESTSOURCE_HARDWARE;
SDMA_ChannelCfg[ 4 ].tmr.b.pri = 0L;
SDMA_ChannelCfg[ 4 ].tmr.b.prien = 0L;
SDMA_ChannelCfg[ 4 ].tmr.b.slm = SDMAC_SLOWSPEED_OFF;
SDMA_ChannelCfg[ 4 ].sgcr.b.gen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 4 ].sgcr.b.sen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 4 ].rs.b.drqi = SDMAC_CLEAR;
SDMA_ChannelCfg[ 4 ].rs.b.ple = SDMAC_CLEAR;
SDMA_ChannelCfg[ 4 ].rs.b.fpt = SDMAC_CLEAR;
SDMA_ChannelCfg[ 4 ].rs.b.tl = SDMAC_TRLIMIT_BY_STS_TC;
SDMA_ChannelCfg[ 4 ].rs.b.tc = 19L * 5;
SDMA_ChannelCfg[ 4 ].chcr.dpb = SDMAC_CLEAR;
SDMA_ChannelCfg[ 4 ].chcr.dpe = SDMAC_SET;
SDMA_ChannelCfg[ 4 ].bufcr.b.ulb = SDMAC_BUFFERLIMIT_DEFAULT;
SDMA_ChannelCfg[ 4 ].dpptr.cf = SDMAC_SET;
SDMA_ChannelCfg[ 4 ].dpptr.ptr = ( FirstDescriptorPointer_u32[ 4 ] ) >> 2;
SDMA_ChannelCfg[ 4 ].dpcr.upf = ( SDMAC_DESCUPDATEFLAG_SAR |
SDMAC_DESCUPDATEFLAG_DAR |
SDMAC_DESCUPDATEFLAG_TSR );
/* Master settings */
SDMA_ChannelCfg[ 5 ].cm.um = SDMAC_CLEAR; /* Supervisor Mode */
SDMA_ChannelCfg[ 5 ].cm.spid = 0x1C; /* Default SPID */
/* Transfer settings */
SDMA_ChannelCfg[ 5 ].tsr = 0L; /* Force the descriptor usage */
SDMA_ChannelCfg[ 5 ].tmr.b.sts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 5 ].tmr.b.dts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 5 ].tmr.b.sm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 5 ].tmr.b.dm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 5 ].tmr.b.trs = SDMAC_REQUESTSOURCE_HARDWARE;
SDMA_ChannelCfg[ 5 ].tmr.b.pri = 0L;
SDMA_ChannelCfg[ 5 ].tmr.b.prien = 0L;
SDMA_ChannelCfg[ 5 ].tmr.b.slm = SDMAC_SLOWSPEED_OFF;
SDMA_ChannelCfg[ 5 ].sgcr.b.gen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 5 ].sgcr.b.sen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 5 ].rs.b.drqi = SDMAC_CLEAR;
SDMA_ChannelCfg[ 5 ].rs.b.ple = SDMAC_CLEAR;
SDMA_ChannelCfg[ 5 ].rs.b.fpt = SDMAC_CLEAR;
SDMA_ChannelCfg[ 5 ].rs.b.tl = SDMAC_TRLIMIT_BY_STS_TC;
SDMA_ChannelCfg[ 5 ].rs.b.tc = 19L * 5;
SDMA_ChannelCfg[ 5 ].chcr.dpb = SDMAC_CLEAR;
SDMA_ChannelCfg[ 5 ].chcr.dpe = SDMAC_SET;
SDMA_ChannelCfg[ 5 ].bufcr.b.ulb = SDMAC_BUFFERLIMIT_DEFAULT;
SDMA_ChannelCfg[ 5 ].dpptr.cf = SDMAC_SET;
SDMA_ChannelCfg[ 5 ].dpptr.ptr = ( FirstDescriptorPointer_u32[ 5 ] ) >> 2;
SDMA_ChannelCfg[ 5 ].dpcr.upf = ( SDMAC_DESCUPDATEFLAG_SAR |
SDMAC_DESCUPDATEFLAG_DAR |
SDMAC_DESCUPDATEFLAG_TSR );
/* Master settings */
SDMA_ChannelCfg[ 6 ].cm.um = SDMAC_CLEAR; /* Supervisor Mode */
SDMA_ChannelCfg[ 6 ].cm.spid = 0x1C; /* Default SPID */
/* Transfer settings */
SDMA_ChannelCfg[ 6 ].tsr = 0L; /* Force the descriptor usage */
SDMA_ChannelCfg[ 6 ].tmr.b.sts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 6 ].tmr.b.dts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 6 ].tmr.b.sm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 6 ].tmr.b.dm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 6 ].tmr.b.trs = SDMAC_REQUESTSOURCE_HARDWARE;
SDMA_ChannelCfg[ 6 ].tmr.b.pri = 0L;
SDMA_ChannelCfg[ 6 ].tmr.b.prien = 0L;
SDMA_ChannelCfg[ 6 ].tmr.b.slm = SDMAC_SLOWSPEED_OFF;
SDMA_ChannelCfg[ 6 ].sgcr.b.gen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 6 ].sgcr.b.sen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 6 ].rs.b.drqi = SDMAC_CLEAR;
SDMA_ChannelCfg[ 6 ].rs.b.ple = SDMAC_CLEAR;
SDMA_ChannelCfg[ 6 ].rs.b.fpt = SDMAC_CLEAR;
SDMA_ChannelCfg[ 6 ].rs.b.tl = SDMAC_TRLIMIT_BY_STS_TC;
SDMA_ChannelCfg[ 6 ].rs.b.tc = 19L * 5;
SDMA_ChannelCfg[ 6 ].chcr.dpb = SDMAC_CLEAR;
SDMA_ChannelCfg[ 6 ].chcr.dpe = SDMAC_SET;
SDMA_ChannelCfg[ 6 ].bufcr.b.ulb = SDMAC_BUFFERLIMIT_DEFAULT;
SDMA_ChannelCfg[ 6 ].dpptr.cf = SDMAC_SET;
SDMA_ChannelCfg[ 6 ].dpptr.ptr = ( FirstDescriptorPointer_u32[ 6 ] ) >> 2;
SDMA_ChannelCfg[ 6 ].dpcr.upf = ( SDMAC_DESCUPDATEFLAG_SAR |
SDMAC_DESCUPDATEFLAG_DAR |
SDMAC_DESCUPDATEFLAG_TSR );
/* Master settings */
SDMA_ChannelCfg[ 7 ].cm.um = SDMAC_CLEAR; /* Supervisor Mode */
SDMA_ChannelCfg[ 7 ].cm.spid = 0x1C; /* Default SPID */
/* Transfer settings */
SDMA_ChannelCfg[ 7 ].tsr = 0L; /* Force the descriptor usage */
SDMA_ChannelCfg[ 7 ].tmr.b.sts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 7 ].tmr.b.dts = SDMAC_TRANSSIZE_4BYTE;
SDMA_ChannelCfg[ 7 ].tmr.b.sm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 7 ].tmr.b.dm = SDMAC_ADDRESSMODE_INCREMENT;
SDMA_ChannelCfg[ 7 ].tmr.b.trs = SDMAC_REQUESTSOURCE_HARDWARE;
SDMA_ChannelCfg[ 7 ].tmr.b.pri = 0L;
SDMA_ChannelCfg[ 7 ].tmr.b.prien = 0L;
SDMA_ChannelCfg[ 7 ].tmr.b.slm = SDMAC_SLOWSPEED_OFF;
SDMA_ChannelCfg[ 7 ].sgcr.b.gen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 7 ].sgcr.b.sen = SDMAC_CLEAR;
SDMA_ChannelCfg[ 7 ].rs.b.drqi = SDMAC_CLEAR;
SDMA_ChannelCfg[ 7 ].rs.b.ple = SDMAC_CLEAR;
SDMA_ChannelCfg[ 7 ].rs.b.fpt = SDMAC_CLEAR;
SDMA_ChannelCfg[ 7 ].rs.b.tl = SDMAC_TRLIMIT_BY_STS_TC;
SDMA_ChannelCfg[ 7 ].rs.b.tc = 19L * 5;
SDMA_ChannelCfg[ 7 ].chcr.dpb = SDMAC_CLEAR;
SDMA_ChannelCfg[ 7 ].chcr.dpe = SDMAC_SET;
SDMA_ChannelCfg[ 7 ].bufcr.b.ulb = SDMAC_BUFFERLIMIT_DEFAULT;
SDMA_ChannelCfg[ 7 ].dpptr.cf = SDMAC_SET;
SDMA_ChannelCfg[ 7 ].dpptr.ptr = ( FirstDescriptorPointer_u32[ 7 ] ) >> 2;
SDMA_ChannelCfg[ 7 ].dpcr.upf = ( SDMAC_DESCUPDATEFLAG_SAR |
SDMAC_DESCUPDATEFLAG_DAR |
SDMAC_DESCUPDATEFLAG_TSR );
for( Channel_u08 = 0;
Channel_u08 < SDMA_A_CHANNELS;
Channel_u08++ )
{
/* assign trigger group 0 (RX-FIFO of CAN units) to SDMAC0 channels */
return( Status_bit );
}
for( Machine_u08 = 0;
Machine_u08 < CAN_A_MACHINES;
Machine_u08++ )
{
Unit_u08 = CAN_A_UNIT( Machine_u08 );
Channel_u08 = CAN_A_CHANNEL( Machine_u08 );
for( Machine_u08 = 0;
Machine_u08 < CAN_A_MACHINES;
Machine_u08++ )
{
Unit_u08 = CAN_A_UNIT( Machine_u08 );
Channel_u08 = CAN_A_CHANNEL( Machine_u08 );
return( Status_bit );
}
Status_bit = GW_Startup( );
Status_bit &= GW_AssignRules( );
ASMN_EICOMMAND;
Trademarks
Renesas and the Renesas logo are trademarks of Renesas Electronics
Corporation. All trademarks and registered trademarks are the property
of their respective owners.