This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS1224 Can回环测试时只有massage box 33-40号能收到数据



测试函数

while(1)
{
	gioToggleBit(gioPORTB, 1);
	gioToggleBit(gioPORTB, 2);
	for(i=1; i<8; i++)
	{
		for (j = 1; j<CAN_DATA_BUFFER_LEN/8 + 1; j++)
		{
			cansetID(canREG3, j, j + 8*i);
			tmp = canGetID(canREG3, j);
			status = canTransmit(canREG3, j, &(can_sent_buffer_data[(j-1)*8]));
			printf("Massage box%2d id = %2d canTransmit return status = %4d
                    \r\n", j, tmp, status);
		}
	}
	i = 0;
	for (j = 8 + 1; j< 64 ; j++)
	{
		status = canIsRxMessageArrived(canREG3, j );
		tmp = canGetID(canREG3, j);
		printf("Massage box%2d id = %2d canIsRxMessageArrived return status =
                %4d \r\n", j, tmp, status);
		if( status )
		{
			canGetData( canREG3, j, &(can_receive_buffer_data[i*8]));
			printf("can_receive_buffer_data[i] index = %4d \r\n",8*i);
			printf(" %4d %4d %4d %4d %4d %4d %4d %4d \r\n",
					can_receive_buffer_data[8*i],
					can_receive_buffer_data[8*i + 1],
					can_receive_buffer_data[8*i + 2],
					can_receive_buffer_data[8*i + 3],
					can_receive_buffer_data[8*i + 4],
					can_receive_buffer_data[8*i + 5],
					can_receive_buffer_data[8*i + 6],
					can_receive_buffer_data[8*i + 7]
					);
			i++;
		}
	}
	for (i = 0; i < DELAY_VALUE; i++);
}

测试结果:

关于massagebox的配置,1-8号为发送,9-64号为接收(中断)

为何只有33-40号massage box能收到数据,其他的收不到数据呢