siemens / meta-iot2050

SIMATIC IOT2050 Isar/Debian Board Support Package
MIT License
129 stars 76 forks source link

iot2050setup: Update default setup and hold time for advanced board #375

Closed AsuraZeng closed 1 year ago

AsuraZeng commented 1 year ago

the usb-serial we are using is cp2102n, when set to rs485 mode, setup time and hold time should refer the transceiver's datasheet (sp339e https://assets.maxlinear.com/web/documents/sp339e.pdf)

Discuss with FAE,Setup time should be over tDZH 1us,hold time should be over tDPLH 1us.

Currently, default value is 0xaa, this time is too long for the hold and setup time. This will affect the efficiency of communication and cause data loss.

And according to the field feedback, this default value set to 0x05 us meets most of the scenarios.

Signed-off-by: chao zeng chao.zeng@siemens.com

jan-kiszka commented 1 year ago

How does this go along with switchserialmode? Shouldn't such parameter also be (or become) defaults on the command line?

AsuraZeng commented 1 year ago

Seems induOs just use this tool to configure the serial port? integrate this change the switchserialmode tool seems more reasonable. I would refine this PR.

jan-kiszka commented 1 year ago

Yes, iot2050setup is not used in Industrial OS.

I would keep the times configurable via switchserialport and possibly iot2050setup, but known-to-work default values should then indeed come already via switchserialmode.

AsuraZeng commented 1 year ago

Currently, the default value is set by switchserialmode. and in the iot2050setup also can change this value.

BaochengSu commented 1 year ago

Better to follow the 52/70 rule for the commit message.

For VS Code, rewrap saves my life.

AsuraZeng commented 1 year ago

Better to follow the 52/70 rule for the commit message.

For VS Code, rewrap saves my life.

I will try this useful tool