diff --git a/Debug/CANOpen_attempt.axf b/Debug/CANOpen_attempt.axf index 2be74c2..35aaf6e 100755 Binary files a/Debug/CANOpen_attempt.axf and b/Debug/CANOpen_attempt.axf differ diff --git a/Debug/CANOpen_attempt.map b/Debug/CANOpen_attempt.map index fd25d14..576060b 100644 --- a/Debug/CANOpen_attempt.map +++ b/Debug/CANOpen_attempt.map @@ -1333,7 +1333,7 @@ LOAD linker stubs .debug_macro 0x00000000000028c8 0x12d /home/yuyu/Documents/Documents/HEPIA/SPI/workspace/CMSIS_CORE_LPC17xx/Debug/libCMSIS_CORE_LPC17xx.a(system_LPC17xx.o) .debug_macro 0x00000000000029f5 0xa7e /home/yuyu/Documents/Documents/HEPIA/SPI/workspace/CMSIS_CORE_LPC17xx/Debug/libCMSIS_CORE_LPC17xx.a(system_LPC17xx.o) -.debug_line 0x0000000000000000 0x2b84 +.debug_line 0x0000000000000000 0x2b82 .debug_line 0x0000000000000000 0x407 ./src/accelo.o .debug_line 0x0000000000000407 0x2a5 ./src/callback.o .debug_line 0x00000000000006ac 0x5b6 ./src/can.o @@ -1341,10 +1341,10 @@ LOAD linker stubs .debug_line 0x0000000000000dc2 0xb5 ./src/crp.o .debug_line 0x0000000000000e77 0x579 ./src/i2c.o .debug_line 0x00000000000013f0 0x55f ./src/lcd.o - .debug_line 0x000000000000194f 0x877 ./src/main.o - .debug_line 0x00000000000021c6 0x1f3 ./src/od.o - .debug_line 0x00000000000023b9 0x34c ./src/ssp.o - .debug_line 0x0000000000002705 0x47f /home/yuyu/Documents/Documents/HEPIA/SPI/workspace/CMSIS_CORE_LPC17xx/Debug/libCMSIS_CORE_LPC17xx.a(system_LPC17xx.o) + .debug_line 0x000000000000194f 0x875 ./src/main.o + .debug_line 0x00000000000021c4 0x1f3 ./src/od.o + .debug_line 0x00000000000023b7 0x34c ./src/ssp.o + .debug_line 0x0000000000002703 0x47f /home/yuyu/Documents/Documents/HEPIA/SPI/workspace/CMSIS_CORE_LPC17xx/Debug/libCMSIS_CORE_LPC17xx.a(system_LPC17xx.o) .debug_str 0x0000000000000000 0xbd53 .debug_str 0x0000000000000000 0xa2b3 ./src/accelo.o diff --git a/Debug/src/main.o b/Debug/src/main.o index 578b953..09031e3 100644 Binary files a/Debug/src/main.o and b/Debug/src/main.o differ diff --git a/Debug/uart2can-bin_bla_Debug.ld b/Debug/uart2can-bin_bla_Debug.ld index f8231b8..e288d5f 100644 --- a/Debug/uart2can-bin_bla_Debug.ld +++ b/Debug/uart2can-bin_bla_Debug.ld @@ -6,7 +6,7 @@ * Generated linker script file for LPC1769 * Created from linkscript.ldt by FMCreateLinkLibraries * Using Freemarker v2.3.30 - * MCUXpresso IDE v11.5.0 [Build 7232] [2022-01-11] on Jun 22, 2022, 1:31:44 AM + * MCUXpresso IDE v11.5.0 [Build 7232] [2022-01-11] on Jun 22, 2022, 2:13:14 AM */ INCLUDE "uart2can-bin_bla_Debug_library.ld" diff --git a/Debug/uart2can-bin_bla_Debug_library.ld b/Debug/uart2can-bin_bla_Debug_library.ld index 82ef6cc..9a028fe 100644 --- a/Debug/uart2can-bin_bla_Debug_library.ld +++ b/Debug/uart2can-bin_bla_Debug_library.ld @@ -6,7 +6,7 @@ * Generated linker script file for LPC1769 * Created from library.ldt by FMCreateLinkLibraries * Using Freemarker v2.3.30 - * MCUXpresso IDE v11.5.0 [Build 7232] [2022-01-11] on Jun 22, 2022, 1:31:44 AM + * MCUXpresso IDE v11.5.0 [Build 7232] [2022-01-11] on Jun 22, 2022, 2:13:14 AM */ GROUP ( diff --git a/Debug/uart2can-bin_bla_Debug_memory.ld b/Debug/uart2can-bin_bla_Debug_memory.ld index 40f542b..ffcb8b8 100644 --- a/Debug/uart2can-bin_bla_Debug_memory.ld +++ b/Debug/uart2can-bin_bla_Debug_memory.ld @@ -6,7 +6,7 @@ * Generated linker script file for LPC1769 * Created from memory.ldt by FMCreateLinkMemory * Using Freemarker v2.3.30 - * MCUXpresso IDE v11.5.0 [Build 7232] [2022-01-11] on Jun 22, 2022, 1:31:44 AM + * MCUXpresso IDE v11.5.0 [Build 7232] [2022-01-11] on Jun 22, 2022, 2:13:14 AM */ MEMORY diff --git a/src/main.c b/src/main.c index 46d2920..9bf0999 100644 --- a/src/main.c +++ b/src/main.c @@ -270,7 +270,7 @@ void CAN_IRQHandler(){ switch((msg.id >> 7) & 0xf){ //get the function code case CAN_HEARTBEAT: if(msg.data[0] != CAN_NMT_STATE_OPERATIONAL) - CANOpen_NMT_send(0, CAN_NMT_STATE_OPERATIONAL); + CANOpen_NMT_send(0, CAN_NMT_CMD_OPERATIONAL); case CAN_RPDO1: CANOpen_pdo1_receive(data_g_1); affichage(); @@ -355,7 +355,7 @@ int slave_main(){ last_timestamp_nmt = get_systick_counter(); } } - if(state == CAN_NMT_CMD_OPERATIONAL){ + if(state == CAN_NMT_STATE_OPERATIONAL){ if(get_systick_counter() - last_timestamp > get_od_accelo_interval()){ get_data_from_i2c_and_ready_to_be_sent_to_master_then_send(); last_timestamp = get_systick_counter();