为什么YTM32B1LE05 canfd发送出去的数据zlg usbcanfd-200u显示的是canfd加速,不是标准的canfd,请问怎么更改
-
为什么YTM32B1LE05 canfd发送出去的数据zlg usbcanfd-200u显示的是canfd加速,不是标准的canfd,请问怎么更改
芯片
YTM32B1LE05 48MHz, 16KB SRAM MCU based on ARM Cortex-M0+ Core48pin LQFP
时钟 40M
代码如下:
const can_user_config_t can_pal_Config = {
.maxBuffNum = 7UL,
.mode = CAN_NORMAL_MODE,
.peClkSrc = CAN_CLK_SOURCE_OSC,
.enableFD = true,
.payloadSize = CAN_PAYLOAD_SIZE_64,
.nominalBitrate = {
.propSeg = 5UL,
.phaseSeg1 = 0UL,
.phaseSeg2 = 1UL,
.preDivider = 3UL,
.rJumpwidth = 1UL},
.dataBitrate = {.propSeg = 2UL, .phaseSeg1 = 2UL, .phaseSeg2 = 1UL, .preDivider = 0UL, .rJumpwidth = 1UL},
.extension = NULL};status_t Can_Board_init()
{
uint32_t index;
uint8_t canid = 0x01;
status_t status = STATUS_SUCCESS;
/* canfd init /
status |= CAN_Init(&can_pal_instance, &can_pal_Config);
status = CAN_InstallEventCallback(&can_pal_instance, can0_mb_CallBack, NULL);
canid = CanId_read();
/ Configure RX buffer with index RX_MAILBOX /
for (index = 0; index < CAN0_RX_MSG_COUNT; index++)
{
can0_RxMsgs[index].id = (can0_RxMsgs[index].id & 0xFF0) | (canid & 0x0F);
can0_TxMsgs[index].id = (can0_TxMsgs[index].id & 0xFF0) | (canid & 0x0F);
/ Config rx buffer /
status = CAN_ConfigRxBuff(&can_pal_instance,
index,
&can0_BuffCfg,
(uint32_t)can0_RxMsgs[index].id);
/ start to receive message /
status = CAN_Receive(&can_pal_instance,
index,
(can_message_t )&can0_RxMsgs[index]);
}
/ Configure TX buffer with index TX_MAILBOX/
for (index = 0; index < CAN0_TX_MSG_COUNT; index++)
{
/* Config tx buffer */
status = CAN_ConfigTxBuff(&can_pal_instance,
index + CAN0_RX_MSG_COUNT,
&can0_BuffCfg);
}
return status;
}
can和的反馈截图如下:
帮助没办法联网的电脑使用YCT
帮助改进和优化YT CONFIG TOOL,有机会抽取YTM32B1ME0 EVB哦...