Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XcpCreateEvent cycleTimeNs parameter mismatch in C_Demo #50

Closed
MarioVolarevic opened this issue May 7, 2024 · 1 comment
Closed

XcpCreateEvent cycleTimeNs parameter mismatch in C_Demo #50

MarioVolarevic opened this issue May 7, 2024 · 1 comment

Comments

@MarioVolarevic
Copy link

MarioVolarevic commented May 7, 2024

Hello, I noticed an issue, but I'm not sure which part is actually wrong, so I'm reporting it here.

Based on this diff I see that you modifed what is requested in the XcpCreateEvent method

image

But in C_Demo example, what is actually sent to the function is:
gXcpEvent_EcuCyclic = XcpCreateEvent("ecuTask", ECU_TASK_CYCLE_TIME_US/CLOCK_TICKS_PER_US, 0, 0, 0);
which is actually value in ms and this incorrectly creates the unit and channel cycle time in a2l.

Now, the question is if only the demo parameter is incorrectly calculated or functionality for calculating the unit and cycleTime inside XcpCreateEvent also has to be modified?

@RainerZ
Copy link
Collaborator

RainerZ commented May 27, 2024

Hello,
you are right. The code in the C_Demo example is incorrect. The cycletime value should be in ns.
The semantic modification of the cycletime parameter in XcpCreateEvent from us to ns happened in commit 876aca1 2022-03-02 20:22. The code in ecu.c is wrong since this commit.
The cycle time information of an event will only be written to the A2l file. CANape does not need it or check it to create a DAQ setup, unless packed mode is used.

Thanks

Thanks

@RainerZ RainerZ closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants