cancel
Showing results for 
Search instead for 
Did you mean: 

TRAVEO™ II

kiranbhosale2
New Contributor

Hello we have been using the PSOC4  device cyt2b9 for our product, we need CAN messages without the filters being applied to them ,  current example code only supports CAN classic bit mask filtering.  i.e only `CANFD_CONFIG_STD_ID_FILTER_CLASSIC` is used in example. there is no example for `CANFD_CONFIG_STD_ID_FILTER_RANGE` 

is there any way to receive messages from multiple CAN IDs. we don't want to setup classic can filters for  each can-id as there may be 20 of them 

please provide sample code for above requirements 

Thanks 

Kiran Bhosale

0 Likes
2 Replies
Ashish
Moderator
Moderator

Hi ,

Can you please confirm the target MCU again? You have mentioned that you're using PSoC, but the part number is  CYT2Bx , which appears to be Traveo II family. Kindly mention the full part number.

If the device is Traveo II- you may refer following AppNote [AN220278] for the details on CAN-FD configuration-  

https://www.infineon.com/dgdl/Infineon-How_to_use_CAN_FD_in_Traveo_II_Family-ApplicationNotes-v01_00...

Regards,

Ashish

0 Likes
kiranbhosale2
New Contributor

Hello Ahish,

Thanks  a lot for you reply , sorry the mcu is Traveo II CYT2B93CAE, and the "AN220278 -How to Use CAN FD in Traveo II Family" doesn't have an example for range filter, neither "TVII_Sample_driver_library_6_6_0" . So just by reading the datasheet i tried to configure it in below mannner 


static cy_stc_canfd_config_t mcu_can__driver_config = {
.txCallback = NULL, // Unused.
.rxCallback = mcu_can__private_receive_callback,
.rxFifoWithTopCallback = NULL, // Unused
.statusCallback = NULL, // Unused
.errorCallback = NULL, // Unused

.canFDMode = false, // Use Classic CAN
.bitrate = // Nominal bit rate 500K settings (sampling point = 75%)
{
.prescaler = 10u - 1u, // cclk/10, When using 500bps, 1bit = 8tq
.timeSegment1 = 5u - 1u, // tseg1 = 5tq
.timeSegment2 = 2u - 1u, // tseg2 = 2tq
.syncJumpWidth = 2u - 1u, // sjw = 2tq
},
.globalFilterConfig =
{
.nonMatchingFramesStandard = CY_CANFD_ACCEPT_IN_RXFIFO_0,
.nonMatchingFramesExtended = CY_CANFD_REJECT_NON_MATCHING,
.rejectRemoteFramesStandard = false,
.rejectRemoteFramesExtended = true,
},
.rxBufferDataSize = CY_CANFD_BUFFER_DATA_SIZE_64,
.rxFifo1DataSize = CY_CANFD_BUFFER_DATA_SIZE_8,
.rxFifo0DataSize = CY_CANFD_BUFFER_DATA_SIZE_8,
.txBufferDataSize = CY_CANFD_BUFFER_DATA_SIZE_64,
.noOfRxBuffers = 8u,
.noOfTxBuffers = 8u,
};
 
 
cy_stc_id_filter_t std_id_filter = CANFD_CONFIG_STD_ID_FILTER_RANGE(0x100, 0x7FF, CY_CANFD_ID_FILTER_ELEMNT_CONFIG_SET_PIORITY_STORE_RXFIFO0);

But  there is no CAN-FD interrupt at all  
please provide an example code which sets "range-filter" for CYT2B9

Regards,
Kiran
0 Likes