The data I send is 5 bytes of 0xA5.
So I have a K60DN512 twrkit.
I tried to send on CAN0 and CAN1 which pin areCAN0_USE_PTB18_19 (for CAN0) and CAN1_USE_PTE24_25 (for CAN1).
I alway put 5 bytes of 0xA5 at 83 Khz.
Here is the configuration file can_config.h:
<CODE>
/*=================================================================================================================*/
// Definition of FlexCAN control bits
#define FLEXCAN_CLOCK_SOURCE 1 /* clock source for FlexCAN: 0 -- external oscillator, 1 -- bus clock from PLL */
#define FLEXCAN_SELF_RECEPTION 0 /* enable self-reception: 0 - disable self-reception; 1 -- enable self-reception */
#define FLEXCAN_SCAN_PRIORITY 0 /* scan prio: 0 -- RxFIFO first, 1 -- MB first */
#define FLEXCAN_STORE_RTR 0 /* remote request storing: 0 -- do not store RTR, 1 -- store RTR as data frame */
#define FLEXCAN_ENTIRE_ARB_CMP 0 /* entire frame arbitration filed comparision including IDE,RTR, excluding RxFIFO
* 0 -- always compare ID of Rx MB regardless of masks, but not compare RTR
* 1 -- mask compare both Rx MB ID and RTR
*/
#define FLEXCAN_INDIVIDUAL_MASK 0 /* individual Rx Masking and queue enable:
* 0 -- message queue is enabled, and masking with RXMGMASK/RX14MASK/RX15MASK,RXFGMASK
* 1 -- message queue is disabled, and individual masking with RXIMRn
*/
#define FLEXCAN_LOCAL_PRIO 0 /* local priority enable: 0 -- disabled, 1 -- enabled */
#define FLEXCAN_LOOP_BACK 0 /* loop back for single node: 0 -- no loopback, 1 -- loopback */
/* NOTE: if use LOOPBACK, self-reception must be enabled by defining*/
//#define FLEXCAN_SELF_RECEPTION 1
#define FLEXCAN_NO_RXFIFO_FILTERS 0//8 /* # of Rx FIFO filters: 0 -- Rx FIFO disabled, or 8/16/24/32/40 */
#define FLEXCAN_ID_TAB_FORMAT 0 /* Rx FIFO ID table format: 0 -- Format A, 1 -- Format B, 2 -- Format C, 3 -- Format D */
// Configuration of MBs
#define NUMBER_OF_RX_MB 12 /* # of Receive MBs, can be changed per application */
#define NUMBER_OF_TX_MB (NUMBER_OF_MB-NUMBER_OF_RX_MB) /* # of MBs are for Transmit MBs */
// Definition of Receive MBs index
#define FLEXCAN_RX_MB_START 0 //0 /* start # of Rx MB */
#define FLEXCAN_RX_MB_END 0 //(NUMBER_OF_RX_MB-1) /* end # of Rx MB */
// Definition of Transmit MBs index
#define FLEXCAN_TX_MB_START 1 //(FLEXCAN_RX_MB_END+1)
#define FLEXCAN_TX_MB_END (NUMBER_OF_MB-1)
// Definition of max # of custom mails
#define MAX_RX_MAILS 20
#define MAX_TX_MAILS 20
#define MAX_RXFIFO_MAILS 10
</CODE>
The scope settings 1V/Div and 500us/div.