zoukankan      html  css  js  c++  java
  • AM335X can驱动移植

    • 驱动选择

        make menuconfig
        
        [*] Networking support  --->
            <*>   CAN bus subsystem support  --->
                --- CAN bus subsystem support
                <*>   Raw CAN Protocol (raw access with CAN-ID filtering)
                <*>   Broadcast Manager CAN Protocol (with content filtering)
                <*>   CAN Gateway/Router (with netlink configuration) 
                    CAN Device Drivers  --->
                        <*> Virtual Local CAN Interface (vcan)
                        <*> Platform CAN drivers with Netlink support
                        [*]   CAN bit-timing calculation
                        <*> Bosch D_CAN devices  --->
                            <*>   Generic Platform Bus based D_CAN driver
    
    • 板级文件内加入

        1429 static struct evm_dev_cfg cmi_at101_dev_cfg[] = {
                    // ... ...
        1442     {d_can_init,     DEV_ON_BASEBOARD, PROFILE_ALL},
        1443     {NULL, 0, 0},
        1444 };
    
        // 设备节点
         850 static void d_can_init(int evm_id, int profile)
         851 {
         852     setup_pin_mux(d_can0_pin_mux);
         853     am33xx_d_can_init(0);
         854 
         855     setup_pin_mux(d_can1_pin_mux);
         856     am33xx_d_can_init(1);
         857 }
    
        // pin_mux
         616 static struct pinmux_config d_can0_pin_mux[] = {
         617      {"uart1_ctsn.d_can0_tx", OMAP_MUX_MODE2 | AM33XX_PULL_ENBL},
         618      {"uart1_rtsn.d_can0_rx", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP},
         619      {NULL, 0},
         620 };
         621 
         622 static struct pinmux_config d_can1_pin_mux[] = {
         623     {"uart0_ctsn.d_can1_tx", OMAP_MUX_MODE2 | AM33XX_PULL_ENBL},
         624     {"uart0_rtsn.d_can1_rx", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP},
         625     {NULL, 0},
         626 };
    
  • 相关阅读:
    【第五年-创业路】
    【工具与解决方案】从做项目中积累学习
    【原理篇】人工智能
    【原理】分布式系统
    攻克Spring
    工具篇集锦
    最好用的JQuery插件集合以及组合拳
    设计模式 之状态模式
    设计模式 之组合模式
    设计模式之 封装算法
  • 原文地址:https://www.cnblogs.com/chenfulin5/p/7685026.html
Copyright © 2011-2022 走看看