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

initKWP not completing initialization #59

Open
FlippedBench opened this issue Aug 16, 2024 · 3 comments
Open

initKWP not completing initialization #59

FlippedBench opened this issue Aug 16, 2024 · 3 comments

Comments

@FlippedBench
Copy link

Hello, I am attempting to use this library to communicate with a Denso ESC that uses fast KWP initialization. However, I have been unable to get the readerKWP example program to work. Probing it with an oscilloscope just shows a single pulse every time it attempts the initialization.

Enabling the debug gets me the following readout:
Looping
Before 25 ms / 25 ms startup.
Enable port.
init_success:0

I am using an RP2040 based Arduino if that could cause any compatibility issues?

Thanks!

@iwanders
Copy link
Owner

Single pulse makes sense, there's one pulse at the start of initKWP, but after that you should see the bytes listed there on line 481. If you don't see that, something is either wrong with the hardware, or with the serial port on your board.

Are you using the tx_pin that is associated to the correct serial port you are providing in the begin method?

@FlippedBench
Copy link
Author

I am assigning them to GPIO pins 10 and 11, which corresponds with how they are physically connected. I tried swapping them in case I mixed up RX and TX but no dice. When you specify what pins to use for the serial port, can it be any GPIO pins, or does it have to be UART TX and RX pins specifically?

@iwanders
Copy link
Owner

iwanders commented Aug 18, 2024

does it have to be UART TX and RX pins specifically?

Depends on your hardware, practically all hardware has only a few pins that can be used as a serial port though. The Tx and Rx passed to the begin function must match the Tx and Rx that are used for the serial port that is also passed in.

Edit; simple answer: Not any GPIO pin, they need to match the uart's pins.

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