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

ModbusRTUClient does not work on STM32F030C8 #94

Open
rikka0w0 opened this issue Jun 7, 2022 · 0 comments
Open

ModbusRTUClient does not work on STM32F030C8 #94

rikka0w0 opened this issue Jun 7, 2022 · 0 comments
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@rikka0w0
Copy link

rikka0w0 commented Jun 7, 2022

Hardware: STM32F030C8T6 custom board, internal clock source, MAX485 chip (DE, RE connected together, DI and RO connected to PA8, half-duplex USART1)

I got "Connection timeout" for any operation. With the help of a hardware logic analyzer, I could see that the Arduino board successfully sent the request and the correct response from the device on the DI pin of MAX485 appeared on PA8. Further investigation shown that the library does not enable Rx after sending the request.

My proposed solution was to append _serial->enableHalfDuplexRx(); to void RS485Class::receive() in "RS485.cpp":

void RS485Class::receive()
{
  if (_rePin > -1) {
    digitalWrite(_rePin, LOW);
  }
  _serial->enableHalfDuplexRx();
}
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants