|
|||||||||||
Technical Support On-Line Manuals µVision User's Guide About µVision 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 Communication I²C Concepts I²C Simulation Virtual Simulation Registers (VTREG) Simulating an I²C Device Application Examples SPI Simulation XPAGE VTREG PPAGE VTREG Flash Programming Dialogs Example Programs Command Line Appendix |
Send Periodic MessagesSignal Functions are created within the µVision Debugger and can periodically send messages to the application. The following signal function sends a message with two bytes 10 times per second. The function receives an info value that gets incremented and transmitted to the application: 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.