-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add external reset pin support to microcontrollers via a Resettable mixin which can be applied to any Block. Refactor VoltageRegulatorEnable to use the Resettable mixin instead. Resettable defines an optional reset port, which when not connected generates internal reset circuitry to keep the device always enabled, and when connected directly connects the digital reset line (without generating any interface circuitry - it is up to the system designer to create a proper circuit). Also break up big SWD, by separating out the optional (from the spec points of view) reset line. SWD connector now only defines the base gnd, power, and SWD lines, with reset, SWO, JTAG TDI moved into optional mixins.
- Loading branch information
Showing
45 changed files
with
400 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from electronics_model import * | ||
|
||
|
||
class Resettable(BlockInterfaceMixin[Block]): | ||
"""Mixin for all devices that specifies a digital reset pin (active-low reset / active-high enable). | ||
THIS IS AN ADVANCED FEATURE - BE SURE TO UNDERSTAND THE RESET REQUIREMENTS OF DEVICES. | ||
When disconnected (mixin not used or port not connected), reset circuitry is automatically generated if needed. | ||
When connected, no additional reset circuitry is generated and the system designer is responsible for providing | ||
appropriate reset signals. | ||
Note that some chips have built-in pull-ups on their reset lines, these are not affected, but no external reset | ||
circuitry will be generated. | ||
Devices may optionally require the reset pin where a power-on reset pulse is required and tying / pulling the | ||
pin high is insufficient. | ||
Microcontrollers may generate internal programming connectors that drive this signal, and system designers must | ||
connect microcontroller resets with this in mind - for example, only driving them in open-drain mode. | ||
""" | ||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
self.reset = self.Port(DigitalSink.empty(), optional=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.