Hi Guys,
I have this S32k developer EVB evaluation kit using which I'm trying to talk to a 250Kbps bit rate CAN device on the CAN bus.
Connection:
There are only 2 devices on the whole CANbus 1) The s32k EVB and, 2) The other CAN device which Im trying to read.
I'm skeptical on 2 things:
1) My bitrate calculation:
.bitrate = { // 80 /( [(1 + (4+1) + (1+1) + (7)] x (1+1)) = 80 / ([15] x 2) = 80/30 = 2.6Mhz
.propSeg = 126, // Fcanclk /( [(1 + (15+1) + (15+1) + (127)] x (1+1)) = 80/ [( 40+50+70) x 2]] = 80/320 =
.phaseSeg1 = 15,
.phaseSeg2 = 15,
.preDivider = 1,
.rJumpwidth = 1
},
and,
2) The mailbox addresses:
#if defined(MASTER)
#define TX_MAILBOX (1UL)
#define TX_MSG_ID (0x01de0800UL)
#define RX_MAILBOX (2UL)
#define RX_MSG_ID (0x01df0900UL)
I'm reading, but I'm not getting the correct replys. As I have tested it before with an Arduino , on it I get all data correctly (extended identifier based call backs)
解決済! 解決策の投稿を見る。
Hello,
You can see the graphical interface in "Component Inspector" view
If you cannot see this view by default, please access Window > Show view > Other > Processor Expert > Component Inspector.
From this view you can generate the user configuration structure for the FlexCAN driver.
For any other information regarding the FlexCAN example (how to enable/disable encryption, etc.), please read the example documentation.
Regards,
Ana
Hello,
You can see the graphical interface in "Component Inspector" view
If you cannot see this view by default, please access Window > Show view > Other > Processor Expert > Component Inspector.
From this view you can generate the user configuration structure for the FlexCAN driver.
For any other information regarding the FlexCAN example (how to enable/disable encryption, etc.), please read the example documentation.
Regards,
Ana
Thank you!, Ana.
Let me try the solution.
Hello,
Are you using the S32 SDK FlexCAN driver with S32 Design Studio? If so, you could use the bitrate calculator from the graphical interface.
Also, please provide the clock source for the Protocol Engine clock and its frequency.
Regards,
Ana
Hi Ana,
Yes, I'm using the S32 Design Studio. Please, let me know from where to access this graphical tool for bitrate calculation!?
Also, I'm using the flexcan_encrypted example as the basis for my project. (although, I'm not using any encryption!)
The clock settings are as follows: