This guide covers serial SCB self-tests, the UART Data Transfer message protocol, and fieldbus communication checks.
I2C SCB test
The I2C SCB self-test validates a master/slave communication path using a dedicated pair of I2C instances that are wired together externally. The master periodically sends a byte to the slave; the slave returns its 1's complement, and the master verifies the value read back. A mismatch or a stalled transfer is reported as an error.
Configuration
In the Device Configurator, enable two I2C SCB instances and wire them together:
- One instance in master mode and one instance in slave mode. Give each an alias of your choice; the application code must reference the same names. This guide uses CYBSP_DUT_I2C_MASTER and CYBSP_DUT_I2C_SLAVE as examples.
- Set the slave instance address to 0x08. The self-test always addresses the fixed I2C_SLAVE_ADDR (0x08, defined in SelfTest_I2C_SCB.h) from the master, so the slave must answer at that address.
- The data rate is not constrained by the self-test; use any standard I2C rate. The master drives the bus, and each transfer is a single byte that must complete within the internal guard time.
- Wire the two instances together externally: connect SDA to SDA and SCL to SCL, and add pull-up resistors on both lines.
Application resources and interrupt handlers
Declare these application-scope resources and interrupt handlers before the application initialization or test function:
static cy_stc_scb_i2c_context_t i2cMasterContext;
static cy_stc_scb_i2c_context_t i2cSlaveContext;
static void I2C_Master_Isr(void)
{
Cy_SCB_I2C_Interrupt(CYBSP_DUT_I2C_MASTER_HW, &i2cMasterContext);
}
static void I2C_Slave_Isr(void)
{
Cy_SCB_I2C_Interrupt(CYBSP_DUT_I2C_SLAVE_HW, &i2cSlaveContext);
}
#define PACKET_SIZE
No data byte to send.
Definition SelfTest_I2C_SCB.h:133
Application-side test sequence
The example initializes both instances, installs the shared interrupt handlers, and then calls SelfTest_I2C_SCB() repeatedly until it reports completion:
const cy_stc_sysint_t masterIrqCfg =
{
#if defined(CY_IP_M7CPUSS) || defined(CY_M4CPUSS_V2_IRQ_MUXING)
.intrSrc = (IRQn_Type)((NvicMux3_IRQn << 16) | CYBSP_DUT_I2C_MASTER_IRQ),
#else
.intrSrc = CYBSP_DUT_I2C_MASTER_IRQ,
#endif
.intrPriority = 3U
};
const cy_stc_sysint_t slaveIrqCfg =
{
#if defined(CY_IP_M7CPUSS) || defined(CY_M4CPUSS_V2_IRQ_MUXING)
.intrSrc = (IRQn_Type)((NvicMux4_IRQn << 16) | CYBSP_DUT_I2C_SLAVE_IRQ),
#else
.intrSrc = CYBSP_DUT_I2C_SLAVE_IRQ,
#endif
.intrPriority = 3U
};
if (CY_SCB_I2C_SUCCESS != Cy_SCB_I2C_Init(CYBSP_DUT_I2C_MASTER_HW,
&CYBSP_DUT_I2C_MASTER_config,
&i2cMasterContext))
{
}
(void)Cy_SysInt_Init(&masterIrqCfg, &I2C_Master_Isr);
#if defined(CY_IP_M7CPUSS) || defined(CY_M4CPUSS_V2_IRQ_MUXING)
NVIC_EnableIRQ((IRQn_Type)NvicMux3_IRQn);
#else
NVIC_EnableIRQ((IRQn_Type)masterIrqCfg.intrSrc);
#endif
Cy_SCB_I2C_Enable(CYBSP_DUT_I2C_MASTER_HW);
if (CY_SCB_I2C_SUCCESS != Cy_SCB_I2C_Init(CYBSP_DUT_I2C_SLAVE_HW,
&CYBSP_DUT_I2C_SLAVE_config,
&i2cSlaveContext))
{
}
Cy_SCB_I2C_SlaveConfigReadBuf(CYBSP_DUT_I2C_SLAVE_HW, i2cSlaveReadBuffer,
Cy_SCB_I2C_SlaveConfigWriteBuf(CYBSP_DUT_I2C_SLAVE_HW, i2cSlaveWriteBuffer,
(void)Cy_SysInt_Init(&slaveIrqCfg, &I2C_Slave_Isr);
#if defined(CY_IP_M7CPUSS) || defined(CY_M4CPUSS_V2_IRQ_MUXING)
NVIC_EnableIRQ((IRQn_Type)NvicMux4_IRQn);
#else
NVIC_EnableIRQ((IRQn_Type)slaveIrqCfg.intrSrc);
#endif
Cy_SCB_I2C_Enable(CYBSP_DUT_I2C_SLAVE_HW);
__enable_irq();
{
CYBSP_DUT_I2C_SLAVE_HW, &i2cSlaveContext,
i2cSlaveReadBuffer, i2cSlaveWriteBuffer);
{
break;
}
{
}
else
{
}
}
uint8_t SelfTest_I2C_SCB(CySCB_Type *master_base, cy_stc_scb_i2c_context_t *master_context, CySCB_Type *slave_base, cy_stc_scb_i2c_context_t *slave_context, uint8_t *slave_read_buf, uint8_t *slave_write_buf)
I2C master under test sends data to I2C slave for self test.
Definition SelfTest_I2C_SCB.c:308
#define OK_STATUS
Test passed / operation completed successfully.
Definition SelfTest_common.h:93
#define PASS_COMPLETE_STATUS
Multi-call self-test: the test completed and the final result is available.
Definition SelfTest_common.h:165
#define PASS_STILL_TESTING_STATUS
Multi-call self-test (Flash, Clock, Configuration Registers, I2C, UART, SPI): the test is still runni...
Definition SelfTest_common.h:163
#define ERROR_STATUS
Test failed or a generic error occurred.
Definition SelfTest_common.h:95
SPI SCB test
The SPI SCB self-test writes a byte and expects to read the same byte back over an internal loopback, stepping through all values from 0x00 to 0xFF. A mismatch, a transmit-FIFO that never empties, or a receive-FIFO that stays empty is reported as an error.
Configuration
- Configure one SPI SCB instance in master mode, so it generates the clock and slave-select. Give it an alias of your choice; the application code must reference the same name. This guide uses CYBSP_DUT_SPI as an example.
- Provide a loopback that feeds MOSI back into MISO. On a device with Smart I/O (such as PSOC™ Control C3), route MOSI to MISO internally through a Smart I/O block (see below). On a device without Smart I/O, connect the MOSI and MISO pins together externally.
- Choose a bit rate high enough that one byte transfers within the self-test guard time (SPI_TXRX_DATA_TIME in SelfTest_SPI_SCB.h); otherwise the test reports a timeout.
Do not run other SPI traffic on the same instance while the self-test executes: it clears the RX and TX FIFOs and temporarily masks the SPI interrupts for each byte.
Smart I/O routing pattern
One possible configuration is:
- Select an SPI SCB whose MOSI and MISO signals can both connect to the same Smart I/O block.
- In the Device Configurator, route the SPI MOSI signal into one Smart I/O chip input and route the SPI MISO signal from one Smart I/O chip output.
- In the Smart I/O Configurator, use an asynchronous clock and keep the Data Unit disabled.
- Configure the MOSI-connected chip channel as Input(Async) and the MISO-connected chip channel as Output.
- Configure one loopback LUT that drives the MISO chip output in Combinational LUT mode (COMB / CY_SMARTIO_LUTOPC_COMB) with hex truth-table value 0x80, and set its three trigger inputs (TR0, TR1, TR2) to the MOSI chip input. This creates the internal pass-through path from MOSI to MISO.
- Leave the remaining Smart I/O chip channels and LUTs in Bypass or disabled unless another board-specific routing requirement needs them.
For one PSOC™ Control C3 example configuration, the concrete values are:
- Smart I/O clock source: Asynchronous
- Smart I/O block alias: CYBSP_SMARTIO_SPI_LOOPBACK
- Chip 2: Input(Async) connected to SPI.mosi
- Chip 3: Output connected to SPI.miso
- I/O 2 and I/O 3: None
- LUT3 (MISO pass-through): TR0 = TR1 = TR2 = Chip 2, Combinational LUT mode (COMB / CY_SMARTIO_LUTOPC_COMB), value 0x80
On other PSOC™ Control C3 boards, or when you choose a different SPI SCB or Smart I/O block, the chip and I/O indices can change. Reuse the same routing pattern and LUT values, but do not assume the same channel numbers.
Application resources and interrupt handler
Declare this application-scope SPI context and interrupt handler before the application initialization or test function:
static cy_stc_scb_spi_context_t spiContext;
static void SPI_Isr(void)
{
Cy_SCB_SPI_Interrupt(CYBSP_DUT_SPI_HW, &spiContext);
}
Application-side test sequence
The example initializes the SPI master, activates the Smart I/O loopback, and then calls SelfTest_SPI_SCB() repeatedly until it reports completion:
const cy_stc_sysint_t spiIrqCfg =
{
#if defined(CY_IP_M7CPUSS) || defined(CY_M4CPUSS_V2_IRQ_MUXING)
.intrSrc = (IRQn_Type)((NvicMux3_IRQn << 16) | CYBSP_DUT_SPI_IRQ),
#else
.intrSrc = CYBSP_DUT_SPI_IRQ,
#endif
.intrPriority = 0U
};
if (CY_SCB_SPI_SUCCESS != Cy_SCB_SPI_Init(CYBSP_DUT_SPI_HW, &CYBSP_DUT_SPI_config,
&spiContext))
{
}
Cy_SCB_SPI_SetActiveSlaveSelect(CYBSP_DUT_SPI_HW, CY_SCB_SPI_SLAVE_SELECT0);
(void)Cy_SysInt_Init(&spiIrqCfg, &SPI_Isr);
#if defined(CY_IP_M7CPUSS) || defined(CY_M4CPUSS_V2_IRQ_MUXING)
NVIC_EnableIRQ((IRQn_Type)NvicMux3_IRQn);
#else
NVIC_EnableIRQ((IRQn_Type)spiIrqCfg.intrSrc);
#endif
Cy_SCB_SPI_Enable(CYBSP_DUT_SPI_HW);
if (CY_SMARTIO_SUCCESS != Cy_SmartIO_Init(CYBSP_SMARTIO_SPI_LOOPBACK_HW,
&CYBSP_SMARTIO_SPI_LOOPBACK_config))
{
}
(void)Cy_SmartIO_SetChBypass(CYBSP_SMARTIO_SPI_LOOPBACK_HW, CY_SMARTIO_CHANNEL_NONE);
Cy_SmartIO_Enable(CYBSP_SMARTIO_SPI_LOOPBACK_HW);
__enable_irq();
Cy_SCB_SPI_ClearRxFifo(CYBSP_DUT_SPI_HW);
Cy_SCB_SPI_ClearTxFifo(CYBSP_DUT_SPI_HW);
{
{
break;
}
{
}
else
{
}
}
uint8_t SelfTest_SPI_SCB(CySCB_Type *base)
This function tests an internal loopback of SPI (transmitted byte must be equal to received).
Definition SelfTest_SPI_SCB.c:140
UART SCB test
Devices that have Smart I/O can use it for the UART self-test by connecting TX and RX through the same Smart I/O block.
Smart I/O routing pattern
One possible configuration is:
- Select a UART SCB whose TX and RX signals can both connect to the same Smart I/O block.
- In the Device Configurator, route the UART TX signal into one Smart I/O chip input and route the UART RX signal from one Smart I/O chip output.
- In the Smart I/O Configurator, use an asynchronous clock and keep the Data Unit disabled.
- Configure the UART TX-connected chip channel as Input(Async) and the UART RX-connected chip channel as Output.
- Enable only the two LUTs used by the loopback path. Set both LUT trigger inputs (TR0, TR1, TR2) to the UART TX chip input.
- Configure LUT2 in Combinational LUT mode (COMB / CY_SMARTIO_LUTOPC_COMB) with hex truth-table value 0x80. This creates the TX-to-RX pass-through path.
- Configure LUT3 in Combinational LUT mode (COMB / CY_SMARTIO_LUTOPC_COMB) with hex truth-table value 0xFF. This drives the additional Smart I/O output used by the verified routing.
- Leave the remaining Smart I/O chip channels and LUTs in Bypass or disabled unless your board routing needs an additional observation or output pin.
For one PSOC™ Control C3 example configuration, the concrete values are:
- Smart I/O clock source: Asynchronous
- Chip 3: Input(Async) connected to UART.tx
- Chip 2: Output connected to UART.rx
- I/O 3: Output
- I/O 2: None
- LUT2: TR0 = TR1 = TR2 = Chip 3, combinational LUT mode (COMB / CY_SMARTIO_LUTOPC_COMB), value 0x80
- LUT3: TR0 = TR1 = TR2 = Chip 3, combinational LUT mode (COMB / CY_SMARTIO_LUTOPC_COMB), value 0xFF
On other PSOC™ Control C3 boards, or when you choose a different UART SCB or Smart I/O block, the chip and I/O indices can change. Reuse the same routing pattern and LUT values, but do not assume the same channel numbers.
Application-side enable sequence
Run this code to enable loopback before the UART self-test starts:
cy_en_smartio_status_t initResult =
Cy_SmartIO_Init(CYBSP_SMARTIO_UART_LOOPBACK_HW, &CYBSP_SMARTIO_UART_LOOPBACK_config);
if (initResult != CY_SMARTIO_SUCCESS)
{
}
else
{
Cy_SmartIO_Enable(CYBSP_SMARTIO_UART_LOOPBACK_HW);
Cy_SysLib_DelayUs(1000u);
}
{
cy_en_scb_uart_status_t uartStatus =
Cy_SCB_UART_Init(CYBSP_DUT_UART_HW, &CYBSP_DUT_UART_config, &CYBSP_DUT_UART_context);
if (CY_SCB_UART_SUCCESS != uartStatus)
{
}
else
{
Cy_SCB_UART_Enable(CYBSP_DUT_UART_HW);
Cy_SCB_UART_ClearRxFifo(CYBSP_DUT_UART_HW);
Cy_SCB_UART_ClearTxFifo(CYBSP_DUT_UART_HW);
}
}
{
{
break;
}
{
}
else
{
}
}
uint8_t SelfTest_UART_SCB(CySCB_Type *base)
This function tests a loopback of UART (transmitted byte must be equal to received).
Definition SelfTest_UART_SCB.c:166
UART data transfer tests
The UART transport helper APIs validate framed message exchange between a UART master and UART slave path.
Configuration
In the Device Configurator, enable three peripherals:
- Master UART: one UART SCB instance in UART mode. Give it the alias CYBSP_DUT_UART_MASTER. Configure the baud rate, data bits, stop bits, and parity to match the slave instance.
- Slave UART: a second UART SCB instance in UART mode. Give it the alias CYBSP_DUT_UART_SLAVE. Its baud rate and frame format must match the master.
- Guard timer: one TCPWM counter instance. Give it the alias CYBSP_TIMER_UART_MASTER. The master protocol uses this timer to detect a slave that does not respond within the guard period.
Wire the two UART instances together externally: connect master TX to slave RX, and slave TX to master RX.
The slave address passed to UartMesSlave_Init() must match the address passed to UartMesMaster_DataProc(). The example uses address 2.
Do not share either UART instance with other application traffic while the test runs: the protocol takes full ownership of the TX/RX FIFOs and interrupt masks for the duration of the exchange.
Application-side test sequence
The example installs the three interrupt handlers, initialises the guard timer and both UART instances, and then polls master and slave states until the exchange completes:
const cy_stc_sysint_t timerIntrCfg =
{
#if defined(CY_IP_M7CPUSS) || defined(CY_M4CPUSS_V2_IRQ_MUXING)
.intrSrc = (IRQn_Type)((NvicMux3_IRQn << 16) | CYBSP_TIMER_UART_MASTER_IRQ),
#else
.intrSrc = CYBSP_TIMER_UART_MASTER_IRQ,
#endif
.intrPriority = 3UL,
};
const cy_stc_sysint_t masterIntrCfg =
{
#if defined(CY_IP_M7CPUSS) || defined(CY_M4CPUSS_V2_IRQ_MUXING)
.intrSrc = (IRQn_Type)((NvicMux4_IRQn << 16) | CYBSP_DUT_UART_MASTER_IRQ),
#else
.intrSrc = CYBSP_DUT_UART_MASTER_IRQ,
#endif
.intrPriority = 3UL,
};
const cy_stc_sysint_t slaveIntrCfg =
{
#if defined(CY_IP_M7CPUSS) || defined(CY_M4CPUSS_V2_IRQ_MUXING)
.intrSrc = (IRQn_Type)((NvicMux5_IRQn << 16) | CYBSP_DUT_UART_SLAVE_IRQ),
#else
.intrSrc = CYBSP_DUT_UART_SLAVE_IRQ,
#endif
.intrPriority = 3UL,
};
#if defined(CY_IP_M7CPUSS) || defined(CY_M4CPUSS_V2_IRQ_MUXING)
NVIC_EnableIRQ((IRQn_Type)NvicMux3_IRQn);
NVIC_EnableIRQ((IRQn_Type)NvicMux4_IRQn);
NVIC_EnableIRQ((IRQn_Type)NvicMux5_IRQn);
#else
NVIC_EnableIRQ((IRQn_Type)CYBSP_TIMER_UART_MASTER_IRQ);
NVIC_EnableIRQ((IRQn_Type)CYBSP_DUT_UART_MASTER_IRQ);
NVIC_EnableIRQ((IRQn_Type)CYBSP_DUT_UART_SLAVE_IRQ);
#endif
Cy_TCPWM_Counter_Init(CYBSP_TIMER_UART_MASTER_HW, CYBSP_TIMER_UART_MASTER_NUM,
&CYBSP_TIMER_UART_MASTER_config);
Cy_TCPWM_Counter_Enable(CYBSP_TIMER_UART_MASTER_HW, CYBSP_TIMER_UART_MASTER_NUM);
Cy_SCB_UART_Init(CYBSP_DUT_UART_MASTER_HW, &CYBSP_DUT_UART_MASTER_config, NULL);
Cy_SCB_UART_Init(CYBSP_DUT_UART_SLAVE_HW, &CYBSP_DUT_UART_SLAVE_config, NULL);
CYBSP_TIMER_UART_MASTER_NUM);
uint8_t txd[] = "1234567890ABCDEF";
uint8_t rxd[sizeof(txd)];
uint8_t status = UM_ERROR;
for (;;)
{
if (UM_PACKREADY == sstate)
{
}
if (UM_BUSY != mstate)
{
break;
}
Cy_SysLib_Delay(1u);
}
{
}
#if defined(CY_IP_M7CPUSS) || defined(CY_M4CPUSS_V2_IRQ_MUXING)
NVIC_DisableIRQ((IRQn_Type)NvicMux3_IRQn);
NVIC_DisableIRQ((IRQn_Type)NvicMux4_IRQn);
NVIC_DisableIRQ((IRQn_Type)NvicMux5_IRQn);
#else
NVIC_DisableIRQ((IRQn_Type)CYBSP_TIMER_UART_MASTER_IRQ);
NVIC_DisableIRQ((IRQn_Type)CYBSP_DUT_UART_MASTER_IRQ);
NVIC_DisableIRQ((IRQn_Type)CYBSP_DUT_UART_SLAVE_IRQ);
#endif
Cy_TCPWM_Counter_Disable(CYBSP_TIMER_UART_MASTER_HW, CYBSP_TIMER_UART_MASTER_NUM);
Cy_SCB_UART_Disable(CYBSP_DUT_UART_MASTER_HW, NULL);
Cy_SCB_UART_DeInit(CYBSP_DUT_UART_MASTER_HW);
Cy_SCB_UART_Disable(CYBSP_DUT_UART_SLAVE_HW, NULL);
Cy_SCB_UART_DeInit(CYBSP_DUT_UART_SLAVE_HW);
uint8_t UartMesMaster_DataProc(uint8_t address, uint8_t *txd, uint8_t tlen, uint8_t *rxd, uint8_t rlen)
Starts the background process of the packet's transmission.
Definition SelfTest_UART_master_message.c:731
void UartMesMaster_DeInit(void)
De-initializes the UART master protocol unit.
Definition SelfTest_UART_master_message.c:668
void UartMesMaster_Msg_ISR(void)
Interrupt handler for UART to receive/transmit.
Definition SelfTest_UART_master_message.c:557
uint8_t UartMesMaster_State(void)
Returns the current master unit state.
Definition SelfTest_UART_master_message.c:797
void UartMesMaster_Init(CySCB_Type *uart_base, TCPWM_Type *counter_base, uint32_t cntNum)
Initializes the UART master protocol unit.
Definition SelfTest_UART_master_message.c:634
void UartMesMaster_Timeout_ISR(void)
UART timer guard interrupt.
Definition SelfTest_UART_master_message.c:595
void UartMesSlave_Msg_ISR(void)
Interrupt handler for UART to receive/transmit.
Definition SelfTest_UART_slave_message.c:537
uint8_t UartMesSlave_State(void)
Returns the state of the current slave unit.
Definition SelfTest_UART_slave_message.c:653
volatile uint8_t * UartMesSlave_GetDataPtr(void)
Returns a pointer to the received data buffer.
Definition SelfTest_UART_slave_message.c:748
void UartMesSlave_DeInit(void)
De-initializes the UART slave protocol unit.
Definition SelfTest_UART_slave_message.c:610
uint8_t UartMesSlave_GetDataSize(void)
Returns the received data size.
Definition SelfTest_UART_slave_message.c:674
void UartMesSlave_Init(CySCB_Type *uart_base, uint8_t address)
Initializes the UART slave protocol unit.
Definition SelfTest_UART_slave_message.c:575
uint8_t UartMesSlave_Respond(uint8_t *txd, uint8_t tlen)
Starts the background sending of the respond.
Definition SelfTest_UART_slave_message.c:704
CAN FD test
The CAN FD self-test runs the channel in internal loopback. It transmits one frame with a rejected message ID and one frame with an accepted message ID, then confirms that only the accepted frame reaches the receive FIFO. The call returns OK_STATUS (0) on success and ERROR_STATUS (1) on failure.
Configuration
- Enable one CAN FD channel. Give it an alias of your choice; the application code must reference the same name. This guide uses CANFD as an example. The application passes the channel base, channel number, configuration structure, and a context structure to the self-test.
- Add a standard-ID acceptance filter that stores message IDs 0x50 to 0x55 into receive FIFO 0. The self-test transmits ID 0x52, which must be accepted, and ID 0x60, which must be rejected, so this filter is required. Configure non-matching standard and extended frames to be rejected.
- The self-test uses internal loopback test mode (CY_CANFD_TEST_MODE_INTERNAL_LOOP_BACK), so it needs no transceiver or external bus. External test mode also drives the external CAN FD pins.
Do not call the self-test while the channel is carrying application bus traffic: it temporarily changes the global filter and the receive callback for the duration of the test and then restores them. The call blocks for about two seconds while it waits for the loopback frames.
Application resources and interrupt handler
Declare this application-scope CAN FD channel constant, context, and interrupt handler before the application initialization or test function:
#define STL_CANFD_CHANNEL (0U)
static cy_stc_canfd_context_t canfdContext;
static void CANFD_Isr(void)
{
Cy_CANFD_IrqHandler(CANFD_HW, STL_CANFD_CHANNEL, &canfdContext);
}
Application-side test sequence
The example enables the channel Message RAM, initializes the channel, installs the interrupt handler, and then calls SelfTest_CANFD() once in internal-loopback mode:
const cy_stc_sysint_t canfdIrqCfg =
{
#if defined(CY_IP_M7CPUSS) || defined(CY_M4CPUSS_V2_IRQ_MUXING)
.intrSrc = (IRQn_Type)((NvicMux3_IRQn << 16) | canfd_0_interrupts0_0_IRQn),
#else
.intrSrc = canfd_0_interrupts0_0_IRQn,
#endif
.intrPriority = 2U
};
Cy_CANFD_EnableMRAM(CANFD_HW, (1UL << STL_CANFD_CHANNEL), 6U);
if (CY_CANFD_SUCCESS != Cy_CANFD_Init(CANFD_HW, STL_CANFD_CHANNEL,
&CANFD_config, &canfdContext))
{
}
(void)Cy_SysInt_Init(&canfdIrqCfg, &CANFD_Isr);
#if defined(CY_IP_M7CPUSS) || defined(CY_M4CPUSS_V2_IRQ_MUXING)
NVIC_EnableIRQ((IRQn_Type)NvicMux3_IRQn);
#else
NVIC_EnableIRQ((IRQn_Type)canfdIrqCfg.intrSrc);
#endif
__enable_irq();
{
&canfdContext,
CY_CANFD_TEST_MODE_INTERNAL_LOOP_BACK);
{
}
else
{
}
}
uint8_t SelfTest_CANFD(CANFD_Type *base, uint32_t chan, const cy_stc_canfd_config_t *config, cy_stc_canfd_context_t *context, cy_stc_canfd_test_mode_t test_mode)
This function configure the CANFD channel in an internal loopback and then it is configure to accept ...