I'm trying to run the CAN test code as suplied from ADS. I compile the code and start it using the IDE but when running the openCAN function it doesn't work correctly. I always get 0xffffffff back from the CreateFile call. This should be caught in the following if statement, but it isn't.
So my problem is that CreateFile always return an error. Secondary problem is that it isn't caught by the application.
Hi Martin. Do you have the most recent release of the CAN test? The test has evolved over time as the drivers have changed.
Also, have you tried using the precompiled version included with the source code? That's often a good sanity check. Email us if you need the latest version of the test app!
I think we got the code the other day, so it should be the latest and greatest. The CE build is 4.2 (unknown subversion).
Since the CreateFile dosn't seem to show an error even though it returns -1 I'm a bit unsure about the test with the precompiled code. It does however throw an error at me for every thing I do. Change Baud rate and Reset CAN chip both does at least.
Since I don't have my CANAlyzer hooked up right now I can't try messages.
Thanks Martin. The ADS CE build will be important for us to know. Take a look at the debug port output and let us know which one you're using (e.g. 4.20.05).
Thanks, Martin. 4.20.02 is a very old build and doesn't include the latest revisions of the CAN driver. Can you try installing one of the current AGX builds and testing again? Thanks!
Looks promising, but I got sidetracked so only had time to try a "reset CAN chip" on the pre built vertsion. Will post again if I stil have problems, otherwise I will consider the problem solved.