|
|||||||||||
Technical Support On-Line Manuals µVision User's Guide ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
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.