Skip to content

Commit

Permalink
Merge pull request #4 from juchong/watchdog
Browse files Browse the repository at this point in the history
Watchdog
  • Loading branch information
Alex Nolan authored Nov 22, 2019
2 parents 8f6eddb + 0b32b69 commit 5cc568e
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 39 deletions.
10 changes: 6 additions & 4 deletions FX3-ExampleGui.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@
<Reference Include="CyUSB">
<HintPath>Resources\CyUSB.dll</HintPath>
</Reference>
<Reference Include="FX3Api, Version=2.1.5.0, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>Resources\FX3Api.dll</HintPath>
</Reference>
<Reference Include="FX3USB, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>Resources\FX3USB.dll</HintPath>
Expand Down Expand Up @@ -390,6 +386,12 @@
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\iSensor-FX3-API\FX3Api.vbproj">
<Project>{a553cac3-91bb-4ed1-914b-f55f1468b0c6}</Project>
<Name>FX3Api</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>XCOPY /y "$(TargetDir)*" "T:\~Lab_SW_Tools\iSensor-FX3-Gui\iSensor-FX3-Gui-Build"</PostBuildEvent>
Expand Down
91 changes: 58 additions & 33 deletions FX3ConfigGUI.designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 24 additions & 2 deletions FX3ConfigGUI.vb
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,11 @@ Public Class FX3ConfigGUI
dataReadyPinInput.SelectedItem = "DIO4"
End If

TimerTickMultiplierDisplay.Text = m_TopGUI.FX3.TimerTickScaleFactor.ToString
TimerTickMultiplierDisplay.ReadOnly = True
WatchdogEnable.Checked = m_TopGUI.FX3.WatchdogEnable
WatchdogTimeout.Text = m_TopGUI.FX3.WatchdogTimeoutSeconds
If Not WatchdogEnable.Checked Then
WatchdogTimeout.ReadOnly = True
End If

End Sub

Expand Down Expand Up @@ -222,10 +225,21 @@ Public Class FX3ConfigGUI
m_TopGUI.FX3.ReadyPin = m_TopGUI.FX3.DIO1
End Select

'set regmap
If Not m_regmappath = "" Then
m_TopGUI.RegMapPath = m_regmappath
End If

'set watchdog paramters
If WatchdogEnable.Checked <> m_TopGUI.FX3.WatchdogEnable Then
m_TopGUI.FX3.WatchdogEnable = WatchdogEnable.Checked
End If

Dim watchdogTime As Integer = Convert.ToInt32(WatchdogTimeout.Text)
If watchdogTime <> m_TopGUI.FX3.WatchdogTimeoutSeconds Then
m_TopGUI.FX3.WatchdogTimeoutSeconds = watchdogTime
End If

StatusLabel.Text = "Done"
StatusLabel.BackColor = Color.Green

Expand All @@ -246,4 +260,12 @@ Public Class FX3ConfigGUI
SelectedRegMap.Text = m_regmappath.Substring(m_regmappath.LastIndexOf("\") + 1)
End Sub

Private Sub WatchdogEnable_CheckedChanged(sender As Object, e As EventArgs) Handles WatchdogEnable.CheckedChanged
If WatchdogEnable.Checked Then
WatchdogTimeout.ReadOnly = False
Else
WatchdogTimeout.ReadOnly = True
End If
End Sub

End Class
Binary file modified FX3_Firmware.img
Binary file not shown.
3 changes: 3 additions & 0 deletions TopGUI.vb
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,9 @@ Public Class TopGUI
FX3.SensorType = My.Settings.SensorType
FX3.PartType = My.Settings.DeviceType

'disable watchdog
FX3.WatchdogEnable = False

'Test the DUT
UpdateDutLabel(FX3.PartType)

Expand Down

0 comments on commit 5cc568e

Please sign in to comment.