From 7abb3b5313d842633f44d2e85485dbed59970498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Thu, 24 Aug 2023 15:48:37 +0200 Subject: [PATCH 1/5] fix id with list on Excel --- 306-controller_interface.X/middleware/alive_checker.h | 2 +- 306-controller_interface.X/middleware/can_interface.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/306-controller_interface.X/middleware/alive_checker.h b/306-controller_interface.X/middleware/alive_checker.h index aeecb85..6b57ac7 100644 --- a/306-controller_interface.X/middleware/alive_checker.h +++ b/306-controller_interface.X/middleware/alive_checker.h @@ -18,7 +18,7 @@ typedef enum { } ALIVE_CHECKER_STATES; typedef enum { - evACinit = 100, // TODO change this number (< 256) + evACinit = 15, evACborn, evACready, evACpoll diff --git a/306-controller_interface.X/middleware/can_interface.h b/306-controller_interface.X/middleware/can_interface.h index d08b1cb..d65266b 100644 --- a/306-controller_interface.X/middleware/can_interface.h +++ b/306-controller_interface.X/middleware/can_interface.h @@ -15,7 +15,7 @@ typedef enum { } CAN_STATES; typedef enum { - evCAinit = 10, // TODO change this number (< 256) + evCAinit = 10, evCAnewMsg, evCAsend } CAN_EVENTS; From d9df16ab660b27e5405f4775d803fa2e7f4ff729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Thu, 24 Aug 2023 17:26:42 +0200 Subject: [PATCH 2/5] move main --- 306-controller_interface.X/{app => }/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) rename 306-controller_interface.X/{app => }/main.c (88%) diff --git a/306-controller_interface.X/app/main.c b/306-controller_interface.X/main.c similarity index 88% rename from 306-controller_interface.X/app/main.c rename to 306-controller_interface.X/main.c index f8f2218..78e5812 100644 --- a/306-controller_interface.X/app/main.c +++ b/306-controller_interface.X/main.c @@ -1,6 +1,6 @@ -#include "../mcc_generated_files/mcc.h" -#include "../xf/xf.h" -#include "factory/factory.h" +#include "mcc_generated_files/mcc.h" +#include "xf/xf.h" +#include "app/factory/factory.h" /* * the main function @@ -29,6 +29,8 @@ void main(void) // TMR0 is interrupting. Important: Set the TICKINTERVAL define in //the xf.h file to the same value as the TMR0 value. TMR0_SetInterruptHandler(XF_decrementAndQueueTimers); + + CAN_Send(1,1,42); while (1) { From 6b32fbe46e890de0a82ccf1320eedbfe84ecf7bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Thu, 24 Aug 2023 17:28:07 +0200 Subject: [PATCH 3/5] fix version PIC 26->25 --- .../mcc_generated_files/device_config.c | 2 +- .../mcc_generated_files/device_config.h | 2 +- .../mcc_generated_files/ecan.c | 8 ++++---- .../mcc_generated_files/interrupt_manager.c | 2 +- .../mcc_generated_files/interrupt_manager.h | 2 +- .../mcc_generated_files/mcc.c | 2 +- .../mcc_generated_files/mcc.h | 2 +- .../mcc_generated_files/memory.c | 2 +- .../mcc_generated_files/memory.h | 8 ++++---- .../mcc_generated_files/pin_manager.c | 2 +- .../mcc_generated_files/pin_manager.h | 2 +- .../mcc_generated_files/tmr0.c | 2 +- .../mcc_generated_files/tmr0.h | 2 +- .../nbproject/configurations.xml | 15 +++++---------- 306-controller_interface.X/nbproject/project.xml | 7 +------ 15 files changed, 25 insertions(+), 35 deletions(-) diff --git a/306-controller_interface.X/mcc_generated_files/device_config.c b/306-controller_interface.X/mcc_generated_files/device_config.c index 1e3bf51..eb96dd3 100644 --- a/306-controller_interface.X/mcc_generated_files/device_config.c +++ b/306-controller_interface.X/mcc_generated_files/device_config.c @@ -14,7 +14,7 @@ This header file provides implementations for driver APIs for all modules selected in the GUI. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 - Device : PIC18F26K83 + Device : PIC18F25K83 Driver Version : 2.00 The generated drivers are tested against the following: Compiler : XC8 2.36 and above or later diff --git a/306-controller_interface.X/mcc_generated_files/device_config.h b/306-controller_interface.X/mcc_generated_files/device_config.h index 72f9a53..0c48b82 100644 --- a/306-controller_interface.X/mcc_generated_files/device_config.h +++ b/306-controller_interface.X/mcc_generated_files/device_config.h @@ -14,7 +14,7 @@ This header file provides implementations for driver APIs for all modules selected in the GUI. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 - Device : PIC18F26K83 + Device : PIC18F25K83 Driver Version : 2.00 The generated drivers are tested against the following: Compiler : XC8 2.36 and above or later diff --git a/306-controller_interface.X/mcc_generated_files/ecan.c b/306-controller_interface.X/mcc_generated_files/ecan.c index 5c28c48..1f2e918 100644 --- a/306-controller_interface.X/mcc_generated_files/ecan.c +++ b/306-controller_interface.X/mcc_generated_files/ecan.c @@ -13,12 +13,12 @@ @Description This source file provides APIs for CAN. Generation Information : - Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7 - Device : PIC18F26K83 + Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 + Device : PIC18F25K83 Driver Version : 3.0.0 The generated drivers are tested against the following: - Compiler : XC8 2.31 and above - MPLAB : MPLAB X 5.45 + Compiler : XC8 2.36 and above + MPLAB : MPLAB X 6.00 */ /* diff --git a/306-controller_interface.X/mcc_generated_files/interrupt_manager.c b/306-controller_interface.X/mcc_generated_files/interrupt_manager.c index db7e86a..bd0b551 100644 --- a/306-controller_interface.X/mcc_generated_files/interrupt_manager.c +++ b/306-controller_interface.X/mcc_generated_files/interrupt_manager.c @@ -16,7 +16,7 @@ all modules selected in the GUI. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 - Device : PIC18F26K83 + Device : PIC18F25K83 Driver Version : 2.04 The generated drivers are tested against the following: Compiler : XC8 2.36 and above or later diff --git a/306-controller_interface.X/mcc_generated_files/interrupt_manager.h b/306-controller_interface.X/mcc_generated_files/interrupt_manager.h index babb6f2..90330f6 100644 --- a/306-controller_interface.X/mcc_generated_files/interrupt_manager.h +++ b/306-controller_interface.X/mcc_generated_files/interrupt_manager.h @@ -16,7 +16,7 @@ all modules selected in the GUI. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 - Device : PIC18F26K83 + Device : PIC18F25K83 Driver Version : 2.03 The generated drivers are tested against the following: Compiler : XC8 2.36 and above or later diff --git a/306-controller_interface.X/mcc_generated_files/mcc.c b/306-controller_interface.X/mcc_generated_files/mcc.c index e2cbde5..0abd635 100644 --- a/306-controller_interface.X/mcc_generated_files/mcc.c +++ b/306-controller_interface.X/mcc_generated_files/mcc.c @@ -14,7 +14,7 @@ This header file provides implementations for driver APIs for all modules selected in the GUI. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 - Device : PIC18F26K83 + Device : PIC18F25K83 Driver Version : 2.00 The generated drivers are tested against the following: Compiler : XC8 2.36 and above or later diff --git a/306-controller_interface.X/mcc_generated_files/mcc.h b/306-controller_interface.X/mcc_generated_files/mcc.h index f681b38..6360c59 100644 --- a/306-controller_interface.X/mcc_generated_files/mcc.h +++ b/306-controller_interface.X/mcc_generated_files/mcc.h @@ -14,7 +14,7 @@ This header file provides implementations for driver APIs for all modules selected in the GUI. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 - Device : PIC18F26K83 + Device : PIC18F25K83 Driver Version : 2.00 The generated drivers are tested against the following: Compiler : XC8 2.36 and above or later diff --git a/306-controller_interface.X/mcc_generated_files/memory.c b/306-controller_interface.X/mcc_generated_files/memory.c index b53aa2c..3bf3c4c 100644 --- a/306-controller_interface.X/mcc_generated_files/memory.c +++ b/306-controller_interface.X/mcc_generated_files/memory.c @@ -14,7 +14,7 @@ This file provides implementations of driver APIs for MEMORY. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 - Device : PIC18F26K83 + Device : PIC18F25K83 Driver Version : 2.1.3 The generated drivers are tested against the following: Compiler : XC8 2.36 and above diff --git a/306-controller_interface.X/mcc_generated_files/memory.h b/306-controller_interface.X/mcc_generated_files/memory.h index 5020390..e295cca 100644 --- a/306-controller_interface.X/mcc_generated_files/memory.h +++ b/306-controller_interface.X/mcc_generated_files/memory.h @@ -14,7 +14,7 @@ This header file provides APIs for driver for MEMORY. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 - Device : PIC18F26K83 + Device : PIC18F25K83 Driver Version : 2.1.3 The generated drivers are tested against the following: Compiler : XC8 2.36 and above @@ -64,9 +64,9 @@ Section: Macro Declarations */ -#define WRITE_FLASH_BLOCKSIZE 128 -#define ERASE_FLASH_BLOCKSIZE 128 -#define END_FLASH 0x010000 +#define WRITE_FLASH_BLOCKSIZE 64 +#define ERASE_FLASH_BLOCKSIZE 64 +#define END_FLASH 0x008000 /** Section: Flash Module APIs diff --git a/306-controller_interface.X/mcc_generated_files/pin_manager.c b/306-controller_interface.X/mcc_generated_files/pin_manager.c index b9c898e..adf9b9a 100644 --- a/306-controller_interface.X/mcc_generated_files/pin_manager.c +++ b/306-controller_interface.X/mcc_generated_files/pin_manager.c @@ -14,7 +14,7 @@ This header file provides implementations for pin APIs for all pins selected in the GUI. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 - Device : PIC18F26K83 + Device : PIC18F25K83 Driver Version : 2.11 The generated drivers are tested against the following: Compiler : XC8 2.36 and above diff --git a/306-controller_interface.X/mcc_generated_files/pin_manager.h b/306-controller_interface.X/mcc_generated_files/pin_manager.h index a4d0d24..791e977 100644 --- a/306-controller_interface.X/mcc_generated_files/pin_manager.h +++ b/306-controller_interface.X/mcc_generated_files/pin_manager.h @@ -14,7 +14,7 @@ This header file provides APIs for driver for . Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 - Device : PIC18F26K83 + Device : PIC18F25K83 Driver Version : 2.11 The generated drivers are tested against the following: Compiler : XC8 2.36 and above diff --git a/306-controller_interface.X/mcc_generated_files/tmr0.c b/306-controller_interface.X/mcc_generated_files/tmr0.c index 72ae03d..5e32ee5 100644 --- a/306-controller_interface.X/mcc_generated_files/tmr0.c +++ b/306-controller_interface.X/mcc_generated_files/tmr0.c @@ -14,7 +14,7 @@ This source file provides APIs for TMR0. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 - Device : PIC18F26K83 + Device : PIC18F25K83 Driver Version : 3.10 The generated drivers are tested against the following: Compiler : XC8 2.36 and above diff --git a/306-controller_interface.X/mcc_generated_files/tmr0.h b/306-controller_interface.X/mcc_generated_files/tmr0.h index 60b06d7..ad9154b 100644 --- a/306-controller_interface.X/mcc_generated_files/tmr0.h +++ b/306-controller_interface.X/mcc_generated_files/tmr0.h @@ -14,7 +14,7 @@ This header file provides APIs for TMR0. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 - Device : PIC18F26K83 + Device : PIC18F25K83 Driver Version : 3.10 The generated drivers are tested against the following: Compiler : XC8 2.36 and above diff --git a/306-controller_interface.X/nbproject/configurations.xml b/306-controller_interface.X/nbproject/configurations.xml index f742c6a..1a5d8bc 100644 --- a/306-controller_interface.X/nbproject/configurations.xml +++ b/306-controller_interface.X/nbproject/configurations.xml @@ -41,7 +41,6 @@ projectFiles="true"> app/factory/factory.c - app/main.c board/led/led.c @@ -65,6 +64,7 @@ xf/event.c xf/xf.c + main.c - board - led - factory - middleware - app - xf + . Makefile localhost - PIC18F26K83 + PIC18F25K83 PICkit3PlatformTool @@ -245,7 +240,7 @@ - + @@ -290,7 +285,7 @@ - + diff --git a/306-controller_interface.X/nbproject/project.xml b/306-controller_interface.X/nbproject/project.xml index 042e146..900e579 100644 --- a/306-controller_interface.X/nbproject/project.xml +++ b/306-controller_interface.X/nbproject/project.xml @@ -13,12 +13,7 @@ ISO-8859-1 - board - led - factory - middleware - app - xf + . From 357a7af1e82ae2ce4893535fa9e174e5a1d1d482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Thu, 24 Aug 2023 17:28:30 +0200 Subject: [PATCH 4/5] test sending CAN message --- .../app/factory/factory.c | 5 ++- .../middleware/can_interface.c | 8 +++++ 306-controller_interface.X/ss22ep.mc3 | 36 +++++++++---------- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/306-controller_interface.X/app/factory/factory.c b/306-controller_interface.X/app/factory/factory.c index 3b149bb..9f9a3bc 100644 --- a/306-controller_interface.X/app/factory/factory.c +++ b/306-controller_interface.X/app/factory/factory.c @@ -52,10 +52,13 @@ void Factory_init() { LED_initHW(l8()); CAN_init(); + CAN_setSender(1); + LED_off(l1()); } void foo(uint8_t a, uint8_t b, uint32_t c){ - + LED_on(l1()); + CAN_Send(b, a, c); } //connect objects if required diff --git a/306-controller_interface.X/middleware/can_interface.c b/306-controller_interface.X/middleware/can_interface.c index cac0487..ea146cc 100644 --- a/306-controller_interface.X/middleware/can_interface.c +++ b/306-controller_interface.X/middleware/can_interface.c @@ -125,3 +125,11 @@ void CAN_Send(uint8_t idRecipient, uint8_t idMsg, uint32_t data) { tmpData = (tmpData<<32) | data; POST(&CAN_myself, &CAN_processEvent, evCAsend, 0, tmpData); } + +/*********** + * SETTERS * + ***********/ + +void CAN_setSender(uint8_t idSender) { + CAN_myself.sender = idSender; +} diff --git a/306-controller_interface.X/ss22ep.mc3 b/306-controller_interface.X/ss22ep.mc3 index 33d9ca8..e23ff38 100644 --- a/306-controller_interface.X/ss22ep.mc3 +++ b/306-controller_interface.X/ss22ep.mc3 @@ -1,4 +1,4 @@ - + @@ -16446,10 +16446,6 @@ 6 - - - 2 - 5 @@ -17166,63 +17162,63 @@ mcc_generated_files\mcc.h - a2db7e36e878f686c2bf0c2ef586ef1c6570fa2f27119b4be7b52af6403091a4 + aead6835bc73f4332d9abb5de6c2a40829de25cc98452c4c69960d51b52844e9 mcc_generated_files\device_config.h - 89c6172ff575ce515b93f2fbc85dcedc2978e58a8e0e1fbdc52e42511ae3bc05 + 2f04b3ff01bbe49769634d389433c7010ffb45d0f2973898e33988be7ab07d56 mcc_generated_files\interrupt_manager.h - 9c2f1ae45f2ac887bb3e8b3763e1a394a6a22ffe4e9ae1c20c336fe6f12da1aa + 313560861c27e0a0b39b2bbb6a64ac2068fd1937dc0339d7303ff241bbb52955 mcc_generated_files\memory.c - 17fb4759c4719b77287f6c4be48edfbcf117b5b8398b771c434f23aceac256e0 + ae2dbb373f8f03dd013cde153de046ba7c3c41033c1dedb8545cde41837ca3da mcc_generated_files\tmr0.h - 6661ab783aae9f11e952805f9bca14209ec06551939552123056eefd5524fff8 + 68e2ba0f47166abd2da1a472d6a67bfde31f9be3edc8582ace93062a6a32f441 main.c - cae37ae3b36cf22e97e106633433f5c00a66dd5d38ec353eb67fbbb0d88bde4d + 91afd5df6694cfcd0279d66d9b5b3eb72a9c4eae825f0c0af82824e2ee66e35e mcc_generated_files\device_config.c - 39a6d1181ef5eab59c7dde2c52a9ea889465d4da43262200f3322abc45e77739 + 4288704a051756dce8bb92e77a82ba1285fc638cde56b3676b59406ba0fcea7b mcc_generated_files\pin_manager.h - 611a409602fd8fba29be052e06a3ce86ad0a3b723b5e0f4c1a998854de7f9a7b + 3e61569926ed5f184a2267965f2cf7ca26dc997d552c213ebd94dbd80da54891 mcc_generated_files\tmr0.c - e0b4d075e819024ae77ea60a2c01182fdca45b783980cb50358d0a614736339d + f9702dc8c67433ffc3b8db9e12ee3a73fb0b152a792d26f6c7a89a3846bc4fc9 mcc_generated_files\pin_manager.c - 04b16a3d3fcbbb333ee6fb545a405b76aba47ef3935be548bf2b8165c43c5654 + f8ace8a0b0d2a4f0ed3e209db056da57858e5a670ad7d514e44352d9187be806 mcc_generated_files\ecan.c - ea62f50d319e1e537d7632774728ad6a779f442e896d043dbdea8066d028a6c6 + b60a119876875a2af386474d32176b8be0f47a074a2d8688e79251a2d7cdf6fa mcc_generated_files\mcc.c - cc9ed44843b509879e6a3f676b561ecde91e1df88d855cf7eca77e1afc8920ca + 34fadc3a271040b358215ec477acf3e135b77137f9a1cc96def75fc2936d3ad6 mcc_generated_files\interrupt_manager.c - df04edcd2c7d85ef90a8dbe4e46f1b1c9487b872153f4f2321249a4ce0d9635f + bb0eaf9aec0554de0106cff27f66e56ae02a40bbdcb68d4d58d8a0d84d8929f6 mcc_generated_files\ecan.h - aa9a50aae81bab76b876ea6123777af7d6a6d0a58fe953be27e8b88776395b2e + 0473fedf57d1376193e049ba507abed0960af84f0e416bea25972c4dae59ca26 mcc_generated_files\memory.h - fbbca4e9d7ce92ddcc637d82b694a1f5cbefa75710a8a18bb1dc9ab5161f0924 + 77a34d015c961db9ed465b4ca2d85ba910fb030ca14c3c2854428ab0b9b6fac2 \ No newline at end of file From 519cbfff68408e468105157ce95c66deb60c5992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Thu, 24 Aug 2023 20:31:40 +0200 Subject: [PATCH 5/5] can interface tested IT WORKING !!!! --- .../app/factory/factory.c | 8 +- 306-controller_interface.X/main.c | 2 - .../middleware/alive_checker.c | 8 +- .../middleware/can_interface.c | 62 ++++++++++--- 306-controller_interface.X/ss22ep.mc3 | 88 +++++++++---------- 5 files changed, 102 insertions(+), 66 deletions(-) diff --git a/306-controller_interface.X/app/factory/factory.c b/306-controller_interface.X/app/factory/factory.c index 9f9a3bc..2cce0d7 100644 --- a/306-controller_interface.X/app/factory/factory.c +++ b/306-controller_interface.X/app/factory/factory.c @@ -57,8 +57,12 @@ void Factory_init() { } void foo(uint8_t a, uint8_t b, uint32_t c){ - LED_on(l1()); - CAN_Send(b, a, c); + if(b){ + LED_on(l1()); + } else { + LED_off(l1()); + } + CAN_Send(a, b, c); } //connect objects if required diff --git a/306-controller_interface.X/main.c b/306-controller_interface.X/main.c index 78e5812..6a05435 100644 --- a/306-controller_interface.X/main.c +++ b/306-controller_interface.X/main.c @@ -29,8 +29,6 @@ void main(void) // TMR0 is interrupting. Important: Set the TICKINTERVAL define in //the xf.h file to the same value as the TMR0 value. TMR0_SetInterruptHandler(XF_decrementAndQueueTimers); - - CAN_Send(1,1,42); while (1) { diff --git a/306-controller_interface.X/middleware/alive_checker.c b/306-controller_interface.X/middleware/alive_checker.c index b674c28..9128429 100644 --- a/306-controller_interface.X/middleware/alive_checker.c +++ b/306-controller_interface.X/middleware/alive_checker.c @@ -36,20 +36,20 @@ bool ALIVE_CHECKER_processEvent(Event* ev) { break; case STAC_SETUP: - if (ev->id = evACborn) { + if (ev->id == evACborn) { me->state = STAC_BORN; } break; case STAC_BORN: - if (ev->id = evACready) { + if (ev->id == evACready) { me->state = STAC_WAIT; ALIVE_CHECKER_emitPoll(me, me->aliveTime*10, 0); } break; case STAC_WAIT: - if (ev->id = evACpoll) { + if (ev->id == evACpoll) { if (me->isAlive) { me->state = STAC_WAIT; ALIVE_CHECKER_emitPoll(me, me->aliveTime*10, 0); @@ -60,7 +60,7 @@ bool ALIVE_CHECKER_processEvent(Event* ev) { break; case STAC_DEAD: - if(ev->id = evACborn) { + if(ev->id == evACborn) { me->state = STAC_BORN; } break; diff --git a/306-controller_interface.X/middleware/can_interface.c b/306-controller_interface.X/middleware/can_interface.c index ea146cc..f36bc99 100644 --- a/306-controller_interface.X/middleware/can_interface.c +++ b/306-controller_interface.X/middleware/can_interface.c @@ -6,6 +6,38 @@ */ #include "can_interface.h" +#include "../mcc_generated_files/ecan.h" + + +typedef union { + struct { + uint8_t sender; + uint8_t recipient; + uint8_t message; + uint32_t data; + } full; + struct { + uint8_t sender; + uint8_t recipient; + uint8_t message; + uint8_t data0; + uint8_t data1; + uint8_t data2; + uint8_t data3; + } separate; +} CAN_MESSAGE; + +typedef union { + struct { + uint8_t byte0; + uint8_t byte1; + uint8_t byte2; + uint8_t byte3; + } separate; + struct { + uint32_t bytes; + } full; +} CAN_4_BYTES; void CAN_init(){ CAN_myself.receiveCan = NULL; @@ -39,11 +71,13 @@ bool CAN_processEvent(Event* ev) { if (me->receiveCan != NULL) { uint32_t canData = (uint32_t) data; data = data>>32; - uint8_t idMsg = (uint8_t) data; - data = data>>4; - uint8_t idRecipient = (uint8_t) data; - data = data>>4; - uint8_t idSender = (uint8_t) data; + + CAN_4_BYTES tmpData; + tmpData.full.bytes = data; + uint8_t idMsg = 0x0F && (tmpData.separate.byte0>>4); + uint8_t idRecipient = 0x0F && tmpData.separate.byte1; + uint8_t idSender = (tmpData.separate.byte1>>4); + me->receiveCan(idSender, idMsg, canData); } } @@ -54,13 +88,13 @@ bool CAN_processEvent(Event* ev) { canMsg.frame.idType = 0; // I don't understand what is it canMsg.frame.dlc = 4; // 4 bytes to send canMsg.frame.rtr = 0; // no remote frame - canMsg.frame.data0 = (uint8_t) data; - data = data >> 8; - canMsg.frame.data1 = (uint8_t) data; + canMsg.frame.data3 = (uint8_t) data; data = data >> 8; canMsg.frame.data2 = (uint8_t) data; data = data >> 8; - canMsg.frame.data3 = (uint8_t) data; + canMsg.frame.data1 = (uint8_t) data; + data = data >> 8; + canMsg.frame.data0 = (uint8_t) data; data = data >> 8; canMsg.frame.id = (uint32_t) data; CAN_transmit(&canMsg); @@ -107,14 +141,14 @@ void CAN_newMsg() { uCAN_MSG canMsg; CAN_receive(&canMsg); data = canMsg.frame.id; - data = data<<32; - data = canMsg.frame.data0; + data = data<<12; + data = data | canMsg.frame.data0; data = data<<8; - data = canMsg.frame.data1; + data = data | canMsg.frame.data1; data = data<<8; - data = canMsg.frame.data2; + data = data | canMsg.frame.data2; data = data<<8; - data = canMsg.frame.data3; + data = data | canMsg.frame.data3; POST(&CAN_myself, &CAN_processEvent, evCAnewMsg, 0, data); } diff --git a/306-controller_interface.X/ss22ep.mc3 b/306-controller_interface.X/ss22ep.mc3 index e23ff38..10db92b 100644 --- a/306-controller_interface.X/ss22ep.mc3 +++ b/306-controller_interface.X/ss22ep.mc3 @@ -1948,7 +1948,7 @@ - {"dataArray":[{"DMA Channels":{"data":{"isDisable":"true","options":"--NONE--","text":"DMA CHANNEL1","value":"false"},"id":"DMA Channels_rowCount_0"},"Src Module":{"data":{"isDisable":"true","options":"--NONE--,ECAN,TMR0,MEMORY","text":"--NONE--","value":"--NONE--"},"id":"Src Module_rowCount_0"},"Src Region":{"data":{"isDisable":"true","options":"SFR#disabled,GPR#enabled,Program Flash#enabled,Data EEPROM#enabled","text":"GPR","value":"GPR"},"id":"Src Region_rowCount_0"},"Src SFR":{"Src SFR":{"isDisable":"true","options":"","text":"","value":""},"data":{"isDisable":"true","options":"","text":"","value":""},"id":"Src SFR_rowCount_0"},"Src VarName":{"data":{"isDisable":"true","options":"","text":"SrcVarName0","value":"SrcVarName0"},"Src VarName":{"isDisable":"true","options":"","text":"SrcVarName0","value":"SrcVarName0"},"id":"Src VarName_rowCount_0"},"Src VarSize":{"data":{"isDisable":"true","options":"","text":"10","value":"10"},"id":"Src VarSize_rowCount_0","Src VarSize":{"isDisable":"true","options":"","text":"10","value":"10"}},"Src Address":{"data":{"isDisable":"true","options":"","text":"Enter Address0","value":"Enter Address0"},"id":"Src Address_rowCount_0","Src Address":{"isDisable":"true","options":"","text":"Enter Address0","value":"Enter Address0"}},"Src Mode":{"Src Mode":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"data":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"id":"Src Mode_rowCount_0"},"Src Message Size":{"data":{"isDisable":"true","options":"","text":"1","value":"1"},"Src Message Size":{"isDisable":"true","options":"","text":"1","value":"1"},"id":"Src Message Size_rowCount_0"},"Dst Module":{"data":{"isDisable":"true","options":"--NONE--,ECAN,TMR0,MEMORY","text":"--NONE--","value":"--NONE--"},"id":"Dst Module_rowCount_0"},"Dst Region":{"data":{"isDisable":"true","options":"SFR,GPR","text":"GPR","value":"GPR"},"id":"Dst Region_rowCount_0"},"Dst SFR":{"Dst SFR":{"isDisable":"true","options":"","text":"","value":""},"data":{"isDisable":"true","options":"","text":"","value":""},"id":"Dst SFR_rowCount_0"},"Dst VarName":{"data":{"isDisable":"true","options":"","text":"DstVarName0","value":"DstVarName0"},"Dst VarName":{"isDisable":"true","options":"","text":"DstVarName0","value":"DstVarName0"},"id":"Dst VarName_rowCount_0"},"Dst VarSize":{"data":{"isDisable":"true","options":"","text":"10","value":"10"},"id":"Dst VarSize_rowCount_0","Dst VarSize":{"isDisable":"true","options":"","text":"10","value":"10"}},"Dst Mode":{"data":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"Dst Mode":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"id":"Dst Mode_rowCount_0"},"Dst Message Size":{"data":{"isDisable":"true","options":"","text":"1","value":"1"},"Dst Message Size":{"isDisable":"true","options":"","text":"1","value":"1"},"id":"Dst Message Size_rowCount_0"},"Start Trigger":{"Start Trigger":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"},"data":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"},"id":"Start Trigger_rowCount_0"},"Abort Trigger":{"data":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"},"id":"Abort Trigger_rowCount_0","Abort Trigger":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"}}},{"DMA Channels":{"data":{"isDisable":"true","options":"--NONE--","text":"DMA CHANNEL2","value":"false"},"id":"DMA Channels_rowCount_1"},"Src Module":{"data":{"isDisable":"true","options":"--NONE--,ECAN,TMR0,MEMORY","text":"--NONE--","value":"--NONE--"},"id":"Src Module_rowCount_1"},"Src Region":{"data":{"isDisable":"true","options":"SFR#disabled,GPR#enabled,Program Flash#enabled,Data EEPROM#enabled","text":"GPR","value":"GPR"},"id":"Src Region_rowCount_1"},"Src SFR":{"Src SFR":{"isDisable":"true","options":"","text":"","value":""},"data":{"isDisable":"true","options":"","text":"","value":""},"id":"Src SFR_rowCount_1"},"Src VarName":{"data":{"isDisable":"true","options":"","text":"SrcVarName1","value":"SrcVarName1"},"Src VarName":{"isDisable":"true","options":"","text":"SrcVarName1","value":"SrcVarName1"},"id":"Src VarName_rowCount_1"},"Src VarSize":{"data":{"isDisable":"true","options":"","text":"10","value":"10"},"id":"Src VarSize_rowCount_1","Src VarSize":{"isDisable":"true","options":"","text":"10","value":"10"}},"Src Address":{"data":{"isDisable":"true","options":"","text":"Enter Address1","value":"Enter Address1"},"id":"Src Address_rowCount_1","Src Address":{"isDisable":"true","options":"","text":"Enter Address1","value":"Enter Address1"}},"Src Mode":{"Src Mode":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"data":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"id":"Src Mode_rowCount_1"},"Src Message Size":{"data":{"isDisable":"true","options":"","text":"1","value":"1"},"Src Message Size":{"isDisable":"true","options":"","text":"1","value":"1"},"id":"Src Message Size_rowCount_1"},"Dst Module":{"data":{"isDisable":"true","options":"--NONE--,ECAN,TMR0,MEMORY","text":"--NONE--","value":"--NONE--"},"id":"Dst Module_rowCount_1"},"Dst Region":{"data":{"isDisable":"true","options":"SFR,GPR","text":"GPR","value":"GPR"},"id":"Dst Region_rowCount_1"},"Dst SFR":{"Dst SFR":{"isDisable":"true","options":"","text":"","value":""},"data":{"isDisable":"true","options":"","text":"","value":""},"id":"Dst SFR_rowCount_1"},"Dst VarName":{"data":{"isDisable":"true","options":"","text":"DstVarName1","value":"DstVarName1"},"Dst VarName":{"isDisable":"true","options":"","text":"DstVarName1","value":"DstVarName1"},"id":"Dst VarName_rowCount_1"},"Dst VarSize":{"data":{"isDisable":"true","options":"","text":"10","value":"10"},"id":"Dst VarSize_rowCount_1","Dst VarSize":{"isDisable":"true","options":"","text":"10","value":"10"}},"Dst Mode":{"data":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"Dst Mode":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"id":"Dst Mode_rowCount_1"},"Dst Message Size":{"data":{"isDisable":"true","options":"","text":"1","value":"1"},"Dst Message Size":{"isDisable":"true","options":"","text":"1","value":"1"},"id":"Dst Message Size_rowCount_1"},"Start Trigger":{"Start Trigger":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"},"data":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"},"id":"Start Trigger_rowCount_1"},"Abort Trigger":{"data":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"},"id":"Abort Trigger_rowCount_1","Abort Trigger":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"}}}],"type":"tableDynamicControls","key":"dmaTable"} + {"dataArray":[{"DMA Channels":{"data":{"isDisable":"true","options":"--NONE--","text":"DMA CHANNEL1","value":"false"},"id":"DMA Channels_rowCount_0"},"Src Module":{"data":{"isDisable":"true","options":"--NONE--,MEMORY,TMR0,ECAN","text":"--NONE--","value":"--NONE--"},"id":"Src Module_rowCount_0"},"Src Region":{"data":{"isDisable":"true","options":"SFR#disabled,GPR#enabled,Program Flash#enabled,Data EEPROM#enabled","text":"GPR","value":"GPR"},"id":"Src Region_rowCount_0"},"Src SFR":{"Src SFR":{"isDisable":"true","options":"","text":"","value":""},"data":{"isDisable":"true","options":"","text":"","value":""},"id":"Src SFR_rowCount_0"},"Src VarName":{"data":{"isDisable":"true","options":"","text":"SrcVarName0","value":"SrcVarName0"},"Src VarName":{"isDisable":"true","options":"","text":"SrcVarName0","value":"SrcVarName0"},"id":"Src VarName_rowCount_0"},"Src VarSize":{"data":{"isDisable":"true","options":"","text":"10","value":"10"},"id":"Src VarSize_rowCount_0","Src VarSize":{"isDisable":"true","options":"","text":"10","value":"10"}},"Src Address":{"data":{"isDisable":"true","options":"","text":"Enter Address0","value":"Enter Address0"},"id":"Src Address_rowCount_0","Src Address":{"isDisable":"true","options":"","text":"Enter Address0","value":"Enter Address0"}},"Src Mode":{"Src Mode":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"data":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"id":"Src Mode_rowCount_0"},"Src Message Size":{"data":{"isDisable":"true","options":"","text":"1","value":"1"},"Src Message Size":{"isDisable":"true","options":"","text":"1","value":"1"},"id":"Src Message Size_rowCount_0"},"Dst Module":{"data":{"isDisable":"true","options":"--NONE--,MEMORY,TMR0,ECAN","text":"--NONE--","value":"--NONE--"},"id":"Dst Module_rowCount_0"},"Dst Region":{"data":{"isDisable":"true","options":"SFR,GPR","text":"GPR","value":"GPR"},"id":"Dst Region_rowCount_0"},"Dst SFR":{"Dst SFR":{"isDisable":"true","options":"","text":"","value":""},"data":{"isDisable":"true","options":"","text":"","value":""},"id":"Dst SFR_rowCount_0"},"Dst VarName":{"data":{"isDisable":"true","options":"","text":"DstVarName0","value":"DstVarName0"},"Dst VarName":{"isDisable":"true","options":"","text":"DstVarName0","value":"DstVarName0"},"id":"Dst VarName_rowCount_0"},"Dst VarSize":{"data":{"isDisable":"true","options":"","text":"10","value":"10"},"id":"Dst VarSize_rowCount_0","Dst VarSize":{"isDisable":"true","options":"","text":"10","value":"10"}},"Dst Mode":{"data":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"Dst Mode":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"id":"Dst Mode_rowCount_0"},"Dst Message Size":{"data":{"isDisable":"true","options":"","text":"1","value":"1"},"Dst Message Size":{"isDisable":"true","options":"","text":"1","value":"1"},"id":"Dst Message Size_rowCount_0"},"Start Trigger":{"Start Trigger":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"},"data":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"},"id":"Start Trigger_rowCount_0"},"Abort Trigger":{"data":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"},"id":"Abort Trigger_rowCount_0","Abort Trigger":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"}}},{"DMA Channels":{"data":{"isDisable":"true","options":"--NONE--","text":"DMA CHANNEL2","value":"false"},"id":"DMA Channels_rowCount_1"},"Src Module":{"data":{"isDisable":"true","options":"--NONE--,MEMORY,TMR0,ECAN","text":"--NONE--","value":"--NONE--"},"id":"Src Module_rowCount_1"},"Src Region":{"data":{"isDisable":"true","options":"SFR#disabled,GPR#enabled,Program Flash#enabled,Data EEPROM#enabled","text":"GPR","value":"GPR"},"id":"Src Region_rowCount_1"},"Src SFR":{"Src SFR":{"isDisable":"true","options":"","text":"","value":""},"data":{"isDisable":"true","options":"","text":"","value":""},"id":"Src SFR_rowCount_1"},"Src VarName":{"data":{"isDisable":"true","options":"","text":"SrcVarName1","value":"SrcVarName1"},"Src VarName":{"isDisable":"true","options":"","text":"SrcVarName1","value":"SrcVarName1"},"id":"Src VarName_rowCount_1"},"Src VarSize":{"data":{"isDisable":"true","options":"","text":"10","value":"10"},"id":"Src VarSize_rowCount_1","Src VarSize":{"isDisable":"true","options":"","text":"10","value":"10"}},"Src Address":{"data":{"isDisable":"true","options":"","text":"Enter Address1","value":"Enter Address1"},"id":"Src Address_rowCount_1","Src Address":{"isDisable":"true","options":"","text":"Enter Address1","value":"Enter Address1"}},"Src Mode":{"Src Mode":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"data":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"id":"Src Mode_rowCount_1"},"Src Message Size":{"data":{"isDisable":"true","options":"","text":"1","value":"1"},"Src Message Size":{"isDisable":"true","options":"","text":"1","value":"1"},"id":"Src Message Size_rowCount_1"},"Dst Module":{"data":{"isDisable":"true","options":"--NONE--,MEMORY,TMR0,ECAN","text":"--NONE--","value":"--NONE--"},"id":"Dst Module_rowCount_1"},"Dst Region":{"data":{"isDisable":"true","options":"SFR,GPR","text":"GPR","value":"GPR"},"id":"Dst Region_rowCount_1"},"Dst SFR":{"Dst SFR":{"isDisable":"true","options":"","text":"","value":""},"data":{"isDisable":"true","options":"","text":"","value":""},"id":"Dst SFR_rowCount_1"},"Dst VarName":{"data":{"isDisable":"true","options":"","text":"DstVarName1","value":"DstVarName1"},"Dst VarName":{"isDisable":"true","options":"","text":"DstVarName1","value":"DstVarName1"},"id":"Dst VarName_rowCount_1"},"Dst VarSize":{"data":{"isDisable":"true","options":"","text":"10","value":"10"},"id":"Dst VarSize_rowCount_1","Dst VarSize":{"isDisable":"true","options":"","text":"10","value":"10"}},"Dst Mode":{"data":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"Dst Mode":{"isDisable":"true","options":"decremented,incremented,unchanged","text":"unchanged","value":"unchanged"},"id":"Dst Mode_rowCount_1"},"Dst Message Size":{"data":{"isDisable":"true","options":"","text":"1","value":"1"},"Dst Message Size":{"isDisable":"true","options":"","text":"1","value":"1"},"id":"Dst Message Size_rowCount_1"},"Start Trigger":{"Start Trigger":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"},"data":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"},"id":"Start Trigger_rowCount_1"},"Abort Trigger":{"data":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"},"id":"Abort Trigger_rowCount_1","Abort Trigger":{"isDisable":"true","options":"AD,ADT,CAN_ERRIF,CAN_IRXIF,CAN_RXB0IF\/FIFOIF,CAN_RXB1IF\/RXBnIF,CAN_TXB0IF,CAN_TXB1IF,CAN_TXB2IF\/TXBnIF,CAN_WAKIF,CCP1,CCP2,CCP3,CCP4,CLC1,CLC2,CLC3,CLC4,CMP1,CMP2,CRC,CSW,CWG1,CWG2,CWG3,DMA1A,DMA1DCNT,DMA1OR,DMA1SCNT,DMA2A,DMA2DCNT,DMA2OR,DMA2SCNT,I2C1,I2C1E,I2C1RX,I2C1TX,I2C2,I2C2E,I2C2RX,I2C2TX,INT0,INT1,INT2,IOC,LVD,NCO,NVM,None,OSF,SCAN,SMT1,SMT1PRA,SMT1PWA,SMT2,SMT2PRA,SMT2PWA,SPI1,SPI1RX,SPI1TX,TMR0,TMR1,TMR1G,TMR2,TMR3,TMR3G,TMR4,TMR5,TMR5G,TMR6,U1,U1E,U1RX,U1TX,U2,U2E,U2RX,U2TX,ZCD","text":"None","value":"None"}}}],"type":"tableDynamicControls","key":"dmaTable"} @@ -17159,27 +17159,7 @@ Window delay time 87.5% - - - mcc_generated_files\mcc.h - aead6835bc73f4332d9abb5de6c2a40829de25cc98452c4c69960d51b52844e9 - - - mcc_generated_files\device_config.h - 2f04b3ff01bbe49769634d389433c7010ffb45d0f2973898e33988be7ab07d56 - - - mcc_generated_files\interrupt_manager.h - 313560861c27e0a0b39b2bbb6a64ac2068fd1937dc0339d7303ff241bbb52955 - - - mcc_generated_files\memory.c - ae2dbb373f8f03dd013cde153de046ba7c3c41033c1dedb8545cde41837ca3da - - - mcc_generated_files\tmr0.h - 68e2ba0f47166abd2da1a472d6a67bfde31f9be3edc8582ace93062a6a32f441 - + main.c 91afd5df6694cfcd0279d66d9b5b3eb72a9c4eae825f0c0af82824e2ee66e35e @@ -17188,6 +17168,46 @@ mcc_generated_files\device_config.c 4288704a051756dce8bb92e77a82ba1285fc638cde56b3676b59406ba0fcea7b + + mcc_generated_files\device_config.h + 2f04b3ff01bbe49769634d389433c7010ffb45d0f2973898e33988be7ab07d56 + + + mcc_generated_files\ecan.c + b60a119876875a2af386474d32176b8be0f47a074a2d8688e79251a2d7cdf6fa + + + mcc_generated_files\ecan.h + 0473fedf57d1376193e049ba507abed0960af84f0e416bea25972c4dae59ca26 + + + mcc_generated_files\interrupt_manager.c + bb0eaf9aec0554de0106cff27f66e56ae02a40bbdcb68d4d58d8a0d84d8929f6 + + + mcc_generated_files\interrupt_manager.h + 313560861c27e0a0b39b2bbb6a64ac2068fd1937dc0339d7303ff241bbb52955 + + + mcc_generated_files\mcc.c + 34fadc3a271040b358215ec477acf3e135b77137f9a1cc96def75fc2936d3ad6 + + + mcc_generated_files\mcc.h + aead6835bc73f4332d9abb5de6c2a40829de25cc98452c4c69960d51b52844e9 + + + mcc_generated_files\memory.c + ae2dbb373f8f03dd013cde153de046ba7c3c41033c1dedb8545cde41837ca3da + + + mcc_generated_files\memory.h + 77a34d015c961db9ed465b4ca2d85ba910fb030ca14c3c2854428ab0b9b6fac2 + + + mcc_generated_files\pin_manager.c + f8ace8a0b0d2a4f0ed3e209db056da57858e5a670ad7d514e44352d9187be806 + mcc_generated_files\pin_manager.h 3e61569926ed5f184a2267965f2cf7ca26dc997d552c213ebd94dbd80da54891 @@ -17197,28 +17217,8 @@ f9702dc8c67433ffc3b8db9e12ee3a73fb0b152a792d26f6c7a89a3846bc4fc9 - mcc_generated_files\pin_manager.c - f8ace8a0b0d2a4f0ed3e209db056da57858e5a670ad7d514e44352d9187be806 - - - mcc_generated_files\ecan.c - b60a119876875a2af386474d32176b8be0f47a074a2d8688e79251a2d7cdf6fa - - - mcc_generated_files\mcc.c - 34fadc3a271040b358215ec477acf3e135b77137f9a1cc96def75fc2936d3ad6 - - - mcc_generated_files\interrupt_manager.c - bb0eaf9aec0554de0106cff27f66e56ae02a40bbdcb68d4d58d8a0d84d8929f6 - - - mcc_generated_files\ecan.h - 0473fedf57d1376193e049ba507abed0960af84f0e416bea25972c4dae59ca26 - - - mcc_generated_files\memory.h - 77a34d015c961db9ed465b4ca2d85ba910fb030ca14c3c2854428ab0b9b6fac2 + mcc_generated_files\tmr0.h + 68e2ba0f47166abd2da1a472d6a67bfde31f9be3edc8582ace93062a6a32f441 \ No newline at end of file