canfd收不到数据_在AWR1642评估板上测试CAN-FD,能发送数据,不能接收数据

在AWR1642评估板上运行mmwave_automotive_toolbox_2_7_1\labs\lab0005_object_data_over_can例程,使用周立功的USB2CAN转换器和上位机软件,基于此例程测试CAN-FD发送和接收数据,能向上位机软件发送数据,但不能接收到上位机软件发送的数据。

软件代码如下:

/*CAN-FD发送接收测试主函数*/

int main (void)

{

Task_Params taskParams;

int32_t errCode;

SOC_Cfg socCfg;

/* Initialize the ESM: */

ESM_init(0U); //dont clear errors as TI RTOS does it

/* Initialize and populate the demo MCB */

memset ((void*)&gMmwMssMCB, 0, sizeof(MmwDemo_MCB));

/* Initialize the SOC confiugration: */

memset ((void *)&socCfg, 0, sizeof(SOC_Cfg));

/* Populate the SOC configuration: */

socCfg.clockCfg = SOC_SysClock_INIT;

/* Initialize the SOC Module: This is done as soon as the application is started

* to ensure that the MPU is correctly configured. */

gMmwMssMCB.socHandle = SOC_init (&socCfg, &errCode);

if (gMmwMssMCB.socHandle == NULL)

{

System_printf ("Error: SOC Module Initialization failed [Error code %d]\n", errCode);

return -1;

}

/* Initialize the DEMO configuration: */

gMmwMssMCB.cfg.sysClockFrequency = MSS_SYS_VCLK;

gMmwMssMCB.cfg.loggingBaudRate = 921600;

gMmwMssMCB.cfg.commandBaudRate = 115200;

/* Check if the SOC is a secure device */

if (SOC_isSecureDevice(gMmwMssMCB.socHandle, &errCode))

{

/* Disable firewall for JTAG and LOGGER (UART) which is needed by the demo */

SOC_controlSecureFirewall(gMmwMssMCB.socHandle,

(uint32_t)(SOC_SECURE_FIREWALL_JTAG | SOC_SECURE_FIREWALL_LOGGER),

SOC_SECURE_FIREWALL_DISABLE,

&errCode);

}

/* Debug Message: */

System_printf ("**********************************************\n");

System_printf ("Debug: Launching the Millimeter Wave Demo\n");

System_printf ("**********************************************\n");

/* Initialize the Task Parameters. */

// Task_Params_init(&taskParams);void MmwDemo_mssInitTask(void)

{

int32_t errCode;

MMWave_InitCfg initCfg;

UART_Params uartParams;

Task_Params taskParams;

Semaphore_Params semParams;

Mailbox_Config mboxCfg;

Error_Block eb;

/* Debug Message: */

System_printf("Debug: MMWDemoMSS Launched the Initialization Task\n");

/*****************************************************************************

* Initialize the mmWave SDK components:

*****************************************************************************/

/* Pinmux setting */

/* Setup the PINMUX to bring out the UART-1 */

Pinmux_Set_OverrideCtrl(SOC_XWR16XX_PINN5_PADBE, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);

Pinmux_Set_FuncSel(SOC_XWR16XX_PINN5_PADBE, SOC_XWR16XX_PINN5_PADBE_MSS_UARTA_TX);

Pinmux_Set_OverrideCtrl(SOC_XWR16XX_PINN4_PADBD, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);

Pinmux_Set_FuncSel(SOC_XWR16XX_PINN4_PADBD, SOC_XW

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值