-
Notifications
You must be signed in to change notification settings - Fork 3k
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
ESP8266: Add configurations for reset control #11331
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,15 @@ | |
"help": "RESET pin for the modem, defaults to Not Connected", | ||
"value": null | ||
}, | ||
"rst-pin-polarity": { | ||
"help": "Polarity of RESET pin for the modem. [0/1]", | ||
"options": [0, 1], | ||
"value": 0 | ||
}, | ||
"rst-assert-time-us": { | ||
"help": "Assert time of reset for the modem in us.", | ||
"value": 2000 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this in microseconds, when it's really interpreted as "2 ticks", meaning "at least 1000us"? If this is going to be microseconds, then it should be set to 200, and the code should be rounding that up to 2 ticks: But again, why is it configurable? Why would this differ between hardware? If the 3000 number for your target is correct, may as well always use it? (How many real microseconds is that supposed to represent? 2000?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Original code is 2 ms:
So I change to:
where Configuring There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, but the point is that it isn't trying to delay for 2000us. It's trying to delay for at least 200us. If you wanted a 2000us delay, it would have to wait for 3 ticks. Using microseconds as the unit, strongly suggests you're fishing for some sort of microsecond precision, so I would immediately question the code as written - pointing out that If this isn't really the ESP8266's reset pin, but a module power pin, then it would be better to add a new setting for the new pin, rather than hijack the code thinking that it's driving reset. That would be in line with what we're doing for all the cellular modems - one "soft" power line which is the device's own "button", and one "hard" which is a power control. |
||
}, | ||
"debug": { | ||
"help": "Enable debug logs. [true/false]", | ||
"value": false | ||
|
@@ -58,6 +67,15 @@ | |
"NUCLEO_F411RE": { | ||
"tx": "D8", | ||
"rx": "D2" | ||
}, | ||
"NUMAKER_PFM_M2351_CM": { | ||
"tx" : "PD_1", | ||
"rx" : "PD_0", | ||
"rst" : "PD_7", | ||
"rts" : "PD_3", | ||
"cts" : "PD_2", | ||
"rst-pin-polarity" : 1, | ||
"rst-assert-time-us" : 3000 | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be useful to make use of the "options" field here to require either 0 or 1 as value here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@teetak01 Where can I reference "options" field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"options" example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michalpasztamobica Thanks.
@teetak01 Use
options
forrst-pin-polarity
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0/1 isn't very meaningful. Have some reference to "active high" and/or "active low". CF
UARTSerial::set_data_carrier_detect
(although I see its doxygen comment is nonsense, sigh).