当前位置:   article > 正文

S32DS的s32k146 can程序500K的速率不通问题_max_num_mb

max_num_mb

坑啊,我把速率调到250K,然后调回500K时,在canCom.c文件中时不会反应的,需要手动改

const flexcan_user_config_t canCom2_InitConfig0 = {
    .fd_enable = false,
    .pe_clock = FLEXCAN_CLK_SOURCE_SOSCDIV2,
    .max_num_mb = 16,
    .num_id_filters = FLEXCAN_RX_FIFO_ID_FILTERS_8,
    .is_rx_fifo_needed = false,
    .flexcanMode = FLEXCAN_NORMAL_MODE,
    .payload = FLEXCAN_PAYLOAD_SIZE_8,
    .bitrate = {
        .propSeg = 7,
        .phaseSeg1 = 4,
        .phaseSeg2 = 1,
        .preDivider = 0,
        .rJumpwidth = 1
    },
    .bitrate_cbt = {
//        .propSeg = 7,
//        .phaseSeg1 = 4,
//        .phaseSeg2 = 1,
//        .preDivider = 0,
//        .rJumpwidth = 1

            .propSeg = 11,
            .phaseSeg1 = 1,
            .phaseSeg2 = 1,
            .preDivider = 0,
            .rJumpwidth = 1
    },
    .transfer_type = FLEXCAN_RXFIFO_USING_INTERRUPTS,
    .rxFifoDMAChannel = 0U
};
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

注释掉的时自动生成的,

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/144579
推荐阅读
相关标签
  

闽ICP备14008679号