|
|||||||||||
Technical Support On-Line Manuals µVision3 User's Guide µVision3 Overview User Interface Creating Applications Utilities Debugging Debug Commands Debug Functions Simulation Digital Input Push Button Interrupt Signal Impulse Patterns Analog Input Square Wave Signal Saw Tooth Signal Sine Wave Noise Signal Signal Combination UART Communication CAN Communication Dialog Pages Virtual Simulation Registers (VTREG) Simulate Incoming Messages Process Outgoing Messages Send Periodic Messages I²C Simulation I²C Concepts I²C Simulation Virtual Simulation Registers (VTREG) Simulating an I²C Device Application Examples SPI Simulation Flash Programming Dialogs Example Programs Command Line Appendix |
Send Periodic Messages
SIGNAL void sendCAN (unsigned int info) { while (1) { CAN0ID = 0x4510; // CAN message ID CAN0L = 2; // message length 2 bytes CAN0B0 = (info & 0xFF); // message data byte 0 CAN0B1 = (info >> 8); // message data byte 1 CAN0IN = 2; // send CAN message with 29-bit ID twatch (CLOCK / 10); // send message 10 times per second info++; // increment info value } } >sendCAN (500); // invoke sendCAN function | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.