Part Number: TMS320F280025C
Tool/software:
Hi there,
I have been successfully sending and receiving CAN by calling my CAN_receive_routine() and CAN_send_routine() in my main loop. The CAN_send_routine() simply contains a bunch of CAN_sendMessage() message calls.
I am not using DMA and not using interrupts. I have two questions:
Q1. For some reason when I try and move my CAN_send_routine() to a 1ms task (which I am using for another process as well), I get an assert error when executing.
I looked up the error in the map file and it looks like can.obj which I assume means can.c file? The line number is 487 which is:
ASSERT((msgCtrl & CAN_IF1MCTL_DLC_M) == msgLen);
This is strange because I have never before had a DLC issue. I tried commenting out this ASSERT Line but for some reason I still get the assert error with the same line number. Any idea what could be happening here?
Q2. Does CAN_sendMessage(uint32_t base, uint32_t objID, uint16_t msgLen, const uint16_t *msgData) block the CPU while sending? I noticed a large slowdown in my 1ms task when simply adding 1 of these function calls per 1ms execution. I had assumed they would not require any processing due to the mailbox functionality. Do I need to enable DMA or anything else?
Thanks in advance!
Steven