modelInputReactivity
Verification scenario no. 3: GP1 (input) toggles during a sleep(3600), the script must react without waiting for the end of the sleep
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
Expected result: mcu.GP0.v stays low until t≈10 s then goes high shortly after (not at t=3600 s, the nominal deadline of the sleep) - the simulation log shows "woken up, GP1 = 1".
Components
| Type | Name | Default | Description |
|---|---|---|---|
| MCU | mcu | scriptPath = Verification/input_reactive.py | |
| Modelica.Electrical.Analog.Basic.Ground | ground | ||
| Modelica.Electrical.Analog.Basic.Resistor | led | Load simulating an LED on GP0 | |
| Modelica.Electrical.Analog.Sources.SignalVoltage | btnSrc | Drives GP1 from outside | |
| Modelica.Blocks.Sources.Step | btnStep | Toggles GP1 at t=10 s, while the script sleeps |