| ||||||||
Technical Support Support Resources Product Information | µVISION DEBUGGER: CAN SIMULATION PROBLEMS WITH THE C167CInformation in this article applies to:
QUESTIONI'm using the µVision CAN simulation for the C167CR and I am having trouble injecting data into the simulated CAN bus. Specifically, I have the following debugger script:
func void inject_CAN_message (unsigned long ID, unsigned char x) {
CAN1L = 8; /* 8-byte message */
CAN1B0 = x;
CAN1B1 = ++x;
CAN1B2 = ++x;
CAN1B3 = ++x;
CAN1B4 = ++x;
CAN1B5 = ++x;
CAN1B6 = ++x;
CAN1B7 = ++x;
CAN1ID = ID; /* Set CAN message ID */
CAN1IN = 1;
}
The CAN message that I inject appears to be correct in the Communication page of the CAN driver simulation in µVision. However, when my program reads the data it is garbage. Is this a known problem? ANSWERYes. This problem is corrected in V4.22 (and later) of the C166 software update. You may download the latest updates from the Keil Website. Last Reviewed: Friday, June 03, 2005 | |||||||
| ||||||||