From a6dbc77a29f42d392d5cbb4678a3f2045a48aa17 Mon Sep 17 00:00:00 2001 From: Rainer Zaiser Date: Mon, 27 May 2024 21:53:55 +0200 Subject: [PATCH] Cycle time in C_Demo ecu.c incorrect value in A2L file --- C_Demo/ecu.c | 2 +- src/xcpLite.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C_Demo/ecu.c b/C_Demo/ecu.c index 2fc84f1..336a57d 100644 --- a/C_Demo/ecu.c +++ b/C_Demo/ecu.c @@ -176,7 +176,7 @@ void ecuInit() { for (unsigned int i = 0; i < 1024; i++) longArray1[i] = i; // Create an XCP event for the cyclic task - gXcpEvent_EcuCyclic = XcpCreateEvent("ecuTask", ECU_TASK_CYCLE_TIME_US/CLOCK_TICKS_PER_US, 0, 0, 0); + gXcpEvent_EcuCyclic = XcpCreateEvent("ecuTask", ECU_TASK_CYCLE_TIME_US*1000, 0, 0, 0); } diff --git a/src/xcpLite.c b/src/xcpLite.c index df1ad4b..caa9439 100644 --- a/src/xcpLite.c +++ b/src/xcpLite.c @@ -1697,7 +1697,7 @@ tXcpEvent* XcpGetEvent(uint16_t event) { } -// Create an XCP event, in us, 0 = sporadic, 0-normal, >=1 realtime, only for packed mode events only, only for extended events +// Create an XCP event, in ns, 0 = sporadic, 0-normal, >=1 realtime, only for packed mode events only, only for extended events // Returns the XCP event number for XcpEventXxx() or 0xFFFF when out of memory uint16_t XcpCreateEvent(const char* name, uint32_t cycleTimeNs, uint8_t priority, uint16_t sampleCount, uint32_t size) {