首页 论坛 嵌入式软件专区 ARM/单片机 MCP2518FD PRO评估板:CANFD最高8M用户手册/参考代码资料分享

发帖 回复

[资料] MCP2518FD PRO评估板:CANFD最高8M用户手册/参考代码资料分享
4675 查看
44 回复
 楼主 | 发布于 2020-01-10 | 只看楼主
分享到:

MCP2518FD PRO评估板:CANFD最高8M用户手册/原理图/参考代码等资料汇总分享

用户手册/原理图/参考程序等资料下载见附件,电脑登入

技术交流群:171897584  

 

 






MCP2518FD:带SPI接口的外部CANFD控制器
MCP2518FD是一款经济高效且外形小巧的外部CAN FD控制器,可通过可用的SPI接口轻松添加到单片机中。 因此,CAN FD通道可以很容易地添加到缺少CANFD外设或没有足够CAN FD通道的单片机上。
MCP2518FD支持ISO11898-1:2015中规定的经典格式(CAN2.0B)和CAN灵活数据速率(CANFD)格式的CAN帧。

主要特性


  • 符合ISO11898-1:2015标准
  • 支持CAN 2.0B和CAN FD
  • 仲裁比特率高达1 Mbps
  • 数据比特率高达8 Mbps
  • 高达20 MHz的SPI时钟速度
  • 31个FIFO可配置为发送或接收
  • 32个灵活的滤波器和掩码对象
  • 一个传输队列
  • 32位时间戳
  • 总线运行状况诊断和错误计数器
  • VDD:2.7V-5.5V
  • 有功电流最大值:12 mA @ 5.5V,40 MHz CAN时钟
  • 温度范围:-40°C至+ 150°C
  • 封装:VDFN14(可湿性侧翼),SOIC14
  • 低功耗模式电流: 10 uA,最大值
  • MCP2518FD Prois a complete CAN solution, which can be used as a control node in a CAN network. The Proboard™ is used to provide the microcontroller (MCU) with unrestricted access to the CAN network bus. MCP2518FD Prois equipped with both the control logic and the physical interface ICs. MCP2518FD Proprovides a reliable high-speed CAN interface to the MCU, providing multiple operating modes (CAN 2.0, CAN FD, Listen Only mode, Sleep and Low Power mode…), CAN bit stream processing (decoding and encoding of the CAN messages, error handling…), TX prioritizing, RX filtering, FIFO buffer, interrupt engine, and more.

    MCP2518FD prois supported by a mikroSDK compliant library, which includes functions that simplify software development. This Proboard™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.



本帖有更多资源,需 登录 才可以下载,没有帐号?立即 注册

(2 ) (5 )
回复 举报

楼主 | 回复于 2020-01-10 11#

SOFTWARE SUPPORT

We provide a library for the MCP2518FD Pro on Microchip page

 https://www.microchip.com/developmenttools/ProductDetails/ADM00576

as well as a demo application (example), developed using. The demo can run on all the mainboard.

Library Description

Library offers a choice to exchange messages with the other device by using CAN communication. Library also offers a choice to access a control, status and RAM registers of the device. For more details check documentation.

Link:https://pan.baidu.com/s/1e59FCqLJ5nfmaGpXxILQHg

password:0mv2

Key functions:

·       void MCP2518FD_transmitMessage( uint8_t numDataBytes, uint8_t *transmitFlag, uint8_t *dataIn ) - Transmits the desired message and checks is message successfully sent.

·       void MCP2518FD_receiveMessage( uint8_t *receiveFlag, uint8_t *dataOut ) - Receives the message and checks is message successfully received.

·       int8_t MCP2518FD_Configure(T_MCP2518FD_id index, T_MCP2518FD_cfg* config) - CAN Control register configuration.

·       int8_t MCP2518FD_ConfigureObjectReset(T_MCP2518FD_cfg* config) - Reset Configure object to reset values.

Examples description

The application is composed of the three sections :

(0 )
评论 (0) 举报

楼主 | 回复于 2020-01-10 12#

·        System Initialization - Initializes peripherals and pins.

·        Application Initialization - Initializes SPI interface and performs the device configuration to work properly.

·        Application Task - (code snippet) - Always checks is new message in FIFO ready for receiving and when is message ready, receives a message from the other device. Also in this example we can sent the desired message via CAN communication to the other device. We can choose a message to be sent by sending the determined command to the UART. In this example the command, which determines a message, can be number from 1 to 7.

(0 )
评论 (0) 举报

楼主 | 回复于 2020-01-10 13#

void applicationTask()
{
    if (UART_Rdy_Ptr())
    {
rxDat = UART_Rd_Ptr();
chPtr = &txd[0];
 
        switch (rxDat)
        {
            case '1' :
            {
                _strcpy( chPtr, &txtMessage1[0] );
                MCP2518FD_transmitMessage( 5, &checkFlag, &txd[0] );
                if (checkFlag == 1)
                {
mikrobus_logWrite( "Message Sent", _LOG_LINE );
                }
            break;
            }
            case '2' :
            {
                _strcpy( chPtr, &txtMessage2[0] );
                MCP2518FD_transmitMessage( 7, &checkFlag, &txd[0] );
                if (checkFlag == 1)
                {
mikrobus_logWrite( "Message Sent", _LOG_LINE );
                }
            break;
            }
(0 )
评论 (0) 举报

楼主 | 回复于 2020-01-10 14#

case '3' :
            {
                _strcpy( chPtr, &txtMessage3[0] );
                MCP2518FD_transmitMessage( 2, &checkFlag, &txd[0] );
                if (checkFlag == 1)
                {
mikrobus_logWrite( "Message Sent", _LOG_LINE );
                }
            break;
            }
            case '4' :
            {
                _strcpy( chPtr, &txtMessage4[0] );
                MCP2518FD_transmitMessage( 4, &checkFlag, &txd[0] );
                if (checkFlag == 1)
                {
mikrobus_logWrite( "Message Sent", _LOG_LINE );
                }
            break;
            }
            case '5' :
            {
                _strcpy( chPtr, &txtMessage5[0] );
                MCP2518FD_transmitMessage( 3, &checkFlag, &txd[0] );
                if (checkFlag == 1)
                {
mikrobus_logWrite( "Message Sent", _LOG_LINE );
                }
            break;
            }
            case '6' :
            {
                _strcpy( chPtr, &txtMessage6[0] );
                MCP2518FD_transmitMessage( 3, &checkFlag, &txd[0] );
                if (checkFlag == 1)
                {
mikrobus_logWrite( "Message Sent", _LOG_LINE );
                }
            break;
            }
            case '7' :
            {
                _strcpy( chPtr, &txtMessage7[0] );
                MCP2518FD_transmitMessage( 7, &checkFlag, &txd[0] );
                if (checkFlag == 1)
                {
mikrobus_logWrite( "Message Sent", _LOG_LINE );
                }
            break;
            }
            default :
            {
            break;
            }
        }
    }
 
    MCP2518FD_receiveMessage( &checkFlag, &rxd[0] );
    if (checkFlag == 1)
    {
chPtr = &rxd[0];
mikrobus_logWrite( "Received Message : ", _LOG_TEXT );
mikrobus_logWrite( chPtr, _LOG_LINE );
    }
}
(0 )
评论 (0) 举报

楼主 | 回复于 2020-01-10 15#

Additional Functions :

·        char * _strcpy( char * _to, char * _from ) - String copy function.

The full application code, and ready to use projects can be found on our LibStock page.

Other mikroE Libraries used in the example:

·       SPI

·       UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

Third party support

TheMCP2518FDProiscompatible with MCP2518FD Click.

https://www.mikroe.com/mcp2518fd-click

(0 )
评论 (0) 举报

楼主 | 回复于 2020-01-10 16#

MIKROSDK

This click board is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant click board demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.

For more information about mikroSDK, visit the official page.

RESOURCES

 mikroBUS™ Standard specification

 LibStock: mikroSDK

 Click board catalog

(0 )
评论 (0) 举报

楼主 | 回复于 2020-01-10 17#

(0 )
评论 (0) 举报

楼主 | 回复于 2020-01-10 18#

Third party support

https://www.mikroe.com/mcp2518fd-click

(0 )
评论 (0) 举报

回复于 2020-01-15 19#

谢谢分享!!!
(0 )
评论 (0) 举报

回复于 2020-01-17 20#

支持下,谢谢分享!
(0 )
评论 (0) 举报
发表回复
0/3000





举报

请选择举报类别

  • 广告垃圾
  • 违规内容
  • 恶意灌水
  • 重复发帖

全部板块

返回顶部