software almost finished, changed documents

This commit is contained in:
Janek Herm 2025-03-26 19:37:58 +01:00
parent 9ca69a2494
commit 98c0abc1f6
31 changed files with 11925 additions and 12358 deletions

BIN
Documents/12V_pump_DCDC.pdf Normal file

Binary file not shown.

BIN
Documents/19V_ACU_DCDC.pdf Normal file

Binary file not shown.

BIN
Documents/8V4_DRS_DCDC.pdf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,145 +0,0 @@
<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/26.0.16 Chrome/132.0.6834.196 Electron/34.2.0 Safari/537.36" version="26.0.16">
<diagram name="Seite-1" id="cC3NooyGeuZej2kiCb_I">
<mxGraphModel dx="1292" dy="1106" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-9" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;curved=0;" edge="1" parent="1" source="wRcSp9Oiyd5VtiwSJmwM-2" target="wRcSp9Oiyd5VtiwSJmwM-15">
<mxGeometry relative="1" as="geometry">
<mxPoint x="300" y="370" as="targetPoint" />
<Array as="points">
<mxPoint x="280" y="130" />
<mxPoint x="280" y="130" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-2" value="FTCU" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" vertex="1" parent="1">
<mxGeometry x="220" y="40" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="wRcSp9Oiyd5VtiwSJmwM-3" target="wRcSp9Oiyd5VtiwSJmwM-11">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-3" value="main.c" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="475" y="610" width="130" height="130" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-8" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.494;entryY=1.067;entryDx=0;entryDy=0;curved=0;entryPerimeter=0;" edge="1" parent="1" source="wRcSp9Oiyd5VtiwSJmwM-5" target="wRcSp9Oiyd5VtiwSJmwM-26">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="539" y="300" />
<mxPoint x="539" y="300" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-10" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;curved=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="wRcSp9Oiyd5VtiwSJmwM-5" target="wRcSp9Oiyd5VtiwSJmwM-3">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-5" value="CAN-Communication.c" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="475" y="310" width="130" height="60" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;curved=1;" edge="1" parent="1" source="wRcSp9Oiyd5VtiwSJmwM-11" target="wRcSp9Oiyd5VtiwSJmwM-43">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-11" value="channel_control.c" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="960" y="645" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="wRcSp9Oiyd5VtiwSJmwM-13" target="wRcSp9Oiyd5VtiwSJmwM-3">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-41" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;curved=1;dashed=1;dashPattern=12 12;" edge="1" parent="1" source="wRcSp9Oiyd5VtiwSJmwM-13">
<mxGeometry relative="1" as="geometry">
<mxPoint x="540" y="370" as="targetPoint" />
<Array as="points">
<mxPoint x="110" y="470" />
<mxPoint x="540" y="470" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-13" value="current_monitoring.c" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="50" y="645" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-15" value="incoming" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" vertex="1" parent="1">
<mxGeometry x="210" y="170" width="140" height="90" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-16" value="heartbeat" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="wRcSp9Oiyd5VtiwSJmwM-15">
<mxGeometry y="30" width="140" height="30" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-17" value="channel updates" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="wRcSp9Oiyd5VtiwSJmwM-15">
<mxGeometry y="60" width="140" height="30" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-19" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;curved=0;" edge="1" parent="1" source="wRcSp9Oiyd5VtiwSJmwM-17" target="wRcSp9Oiyd5VtiwSJmwM-5">
<mxGeometry relative="1" as="geometry">
<mxPoint x="280" y="290" as="sourcePoint" />
<Array as="points">
<mxPoint x="280" y="340" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-27" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;curved=0;" edge="1" parent="1" source="wRcSp9Oiyd5VtiwSJmwM-24" target="wRcSp9Oiyd5VtiwSJmwM-2">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="540" y="70" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-24" value="outgoing" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" vertex="1" parent="1">
<mxGeometry x="470" y="170" width="140" height="90" as="geometry">
<mxRectangle x="470" y="170" width="90" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-25" value="ISENSE/VSENSE" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="wRcSp9Oiyd5VtiwSJmwM-24">
<mxGeometry y="30" width="140" height="30" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-26" value="Error-Codes" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="wRcSp9Oiyd5VtiwSJmwM-24">
<mxGeometry y="60" width="140" height="30" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="wRcSp9Oiyd5VtiwSJmwM-29" target="wRcSp9Oiyd5VtiwSJmwM-5">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-29" value="CAN-Communication.h" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1">
<mxGeometry x="900" y="310" width="130" height="60" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-32" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="wRcSp9Oiyd5VtiwSJmwM-31" target="wRcSp9Oiyd5VtiwSJmwM-13">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-31" value="current_monitoring.h" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1">
<mxGeometry x="50" y="970" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-34" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="wRcSp9Oiyd5VtiwSJmwM-33" target="wRcSp9Oiyd5VtiwSJmwM-11">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-33" value="channel_control.h" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1">
<mxGeometry x="960" y="970" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-36" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="wRcSp9Oiyd5VtiwSJmwM-35" target="wRcSp9Oiyd5VtiwSJmwM-3">
<mxGeometry relative="1" as="geometry">
<mxPoint x="540" y="750" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-35" value="main.h" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1">
<mxGeometry x="480" y="970" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-37" value="provides addresses and frame-structure" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="640" y="310" width="230" height="30" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-38" value="groups channels into unions" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;rotation=-90;" vertex="1" parent="1">
<mxGeometry x="910" y="820" width="170" height="30" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-39" value="provides correction-factors, groups all measurements into one struct" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;rotation=90;" vertex="1" parent="1">
<mxGeometry x="40" y="820" width="190" height="30" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-40" value="defines all pins" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;rotation=90;" vertex="1" parent="1">
<mxGeometry x="500" y="840" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-42" value="unklar" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="310" y="440" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-45" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;curved=1;flowAnimation=0;shadow=0;" edge="1" parent="1" source="wRcSp9Oiyd5VtiwSJmwM-43" target="wRcSp9Oiyd5VtiwSJmwM-13">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="wRcSp9Oiyd5VtiwSJmwM-43" value="PROFETs" style="whiteSpace=wrap;html=1;aspect=fixed;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" vertex="1" parent="1">
<mxGeometry x="500" y="1170" width="80" height="80" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

Binary file not shown.

View File

@ -7414,7 +7414,7 @@
)
(fp_arc
(start 0 2.2)
(mid 0.05 2.25)
(mid 0.050001 2.250001)
(end 0 2.300001)
(stroke
(width 0.1)
@ -82275,343 +82275,6 @@
)
)
)
(footprint "brain:toasty"
(layer "F.Cu")
(uuid "9e661cac-bbf1-4e9c-960e-b242aa83d97e")
(at 266.25 151.95)
(property "Reference" "G***"
(at 0 0 0)
(layer "F.SilkS")
(hide yes)
(uuid "7e0bca53-630b-4887-b616-e4c2eb8beeea")
(effects
(font
(size 1.5 1.5)
(thickness 0.3)
)
)
)
(property "Value" "LOGO"
(at 0.75 0 0)
(layer "F.SilkS")
(hide yes)
(uuid "eb755ed6-df00-4757-8567-7b5d6a6e2185")
(effects
(font
(size 1.5 1.5)
(thickness 0.3)
)
)
)
(property "Footprint" "brain:toasty"
(at 0 0 0)
(layer "F.Fab")
(hide yes)
(uuid "10d06b02-cf3f-4c99-8e26-90feb7730081")
(effects
(font
(size 1.27 1.27)
(thickness 0.15)
)
)
)
(property "Datasheet" ""
(at 0 0 0)
(layer "F.Fab")
(hide yes)
(uuid "703e8053-df44-453a-9e11-8d8d469d0ba2")
(effects
(font
(size 1.27 1.27)
(thickness 0.15)
)
)
)
(property "Description" ""
(at 0 0 0)
(layer "F.Fab")
(hide yes)
(uuid "5b218782-95f3-4013-8a62-463f7a21c34b")
(effects
(font
(size 1.27 1.27)
(thickness 0.15)
)
)
)
(attr board_only exclude_from_pos_files exclude_from_bom)
(fp_poly
(pts
(xy 0.531564 -1.226003) (xy 0.625716 -1.217934) (xy 0.734536 -1.204303) (xy 0.838914 -1.187893)
(xy 0.920967 -1.171586) (xy 0.97572 -1.154922) (xy 1.009053 -1.135908) (xy 1.017495 -1.127455) (xy 1.044009 -1.073651)
(xy 1.040853 -1.017975) (xy 1.008874 -0.969812) (xy 1.002795 -0.964712) (xy 0.96484 -0.941441) (xy 0.923201 -0.933412)
(xy 0.867013 -0.939536) (xy 0.830608 -0.947437) (xy 0.78938 -0.955192) (xy 0.725299 -0.964973) (xy 0.648551 -0.97529)
(xy 0.598038 -0.981424) (xy 0.499321 -0.994987) (xy 0.428925 -1.010369) (xy 0.381949 -1.029453)
(xy 0.35349 -1.054128) (xy 0.340301 -1.080573) (xy 0.338725 -1.129613) (xy 0.357931 -1.178731) (xy 0.391364 -1.214679)
(xy 0.410998 -1.223483) (xy 0.458013 -1.228018)
)
(stroke
(width 0)
(type solid)
)
(fill solid)
(layer "F.SilkS")
(uuid "e80a966c-20dc-4595-bd88-9a7b448ce97a")
)
(fp_poly
(pts
(xy 0.134169 0.277157) (xy 0.173265 0.304692) (xy 0.175183 0.30657) (xy 0.194755 0.326913) (xy 0.208907 0.346004)
(xy 0.215974 0.366119) (xy 0.214295 0.389535) (xy 0.202206 0.418529) (xy 0.178044 0.455378) (xy 0.140146 0.502358)
(xy 0.08685 0.561746) (xy 0.016493 0.635819) (xy -0.072588 0.726855) (xy -0.182057 0.837129) (xy -0.294928 0.950243)
(xy -0.419642 1.074914) (xy -0.523279 1.177894) (xy -0.608043 1.26119) (xy -0.67614 1.326812) (xy -0.729777 1.376767)
(xy -0.77116 1.413065) (xy -0.802494 1.437714) (xy -0.825985 1.452722) (xy -0.843839 1.460097) (xy -0.856846 1.46187)
(xy -0.914368 1.446443) (xy -0.943998 1.423422) (xy -0.961014 1.404388) (xy -0.972909 1.386256)
(xy -0.977981 1.366778) (xy -0.974526 1.343707) (xy -0.960845 1.314795) (xy -0.935235 1.277792)
(xy -0.895994 1.230452) (xy -0.84142 1.170526) (xy -0.769811 1.095765) (xy -0.679466 1.003923) (xy -0.568682 0.89275)
(xy -0.460378 0.784572) (xy -0.323148 0.648156) (xy -0.20762 0.534581) (xy -0.112538 0.442675) (xy -0.036641 0.371266)
(xy 0.021328 0.319183) (xy 0.062629 0.285253) (xy 0.088521 0.268305) (xy 0.096885 0.265794)
)
(stroke
(width 0)
(type solid)
)
(fill solid)
(layer "F.SilkS")
(uuid "1585b0d2-4ffb-4f00-b352-59967b10326d")
)
(fp_poly
(pts
(xy 0.921913 1.054988) (xy 0.949482 1.078862) (xy 0.965131 1.09921) (xy 0.975835 1.118446) (xy 0.979862 1.138865)
(xy 0.975481 1.162761) (xy 0.960961 1.192427) (xy 0.934571 1.230156) (xy 0.894579 1.278242) (xy 0.839254 1.338979)
(xy 0.766866 1.41466) (xy 0.675683 1.507579) (xy 0.563974 1.62003) (xy 0.469652 1.714586) (xy 0.345483 1.838794)
(xy 0.242385 1.941354) (xy 0.158121 2.024294) (xy 0.090454 2.089645) (xy 0.037149 2.139435) (xy -0.004031 2.175694)
(xy -0.035323 2.200451) (xy -0.058962 2.215736) (xy -0.077185 2.223577) (xy -0.092229 2.226006)
(xy -0.093956 2.22603) (xy -0.146978 2.213486) (xy -0.181528 2.182259) (xy -0.205721 2.141466) (xy -0.215956 2.104278)
(xy -0.215958 2.103901) (xy -0.204261 2.082436) (xy -0.169076 2.039073) (xy -0.110269 1.973667)
(xy -0.027702 1.886073) (xy 0.078761 1.776144) (xy 0.209256 1.643734) (xy 0.297413 1.555171) (xy 0.421808 1.430776)
(xy 0.52512 1.328014) (xy 0.609587 1.244854) (xy 0.67745 1.179266) (xy 0.730949 1.129222) (xy 0.772323 1.092692)
(xy 0.803812 1.067646) (xy 0.827656 1.052054) (xy 0.846096 1.043887) (xy 0.86137 1.041116) (xy 0.864816 1.041029)
)
(stroke
(width 0)
(type solid)
)
(fill solid)
(layer "F.SilkS")
(uuid "5d071925-a521-4eb0-8173-c04a4848b679")
)
(fp_poly
(pts
(xy 0.744053 0.479333) (xy 0.779092 0.51897) (xy 0.7944 0.57038) (xy 0.791143 0.60339) (xy 0.777982 0.621385)
(xy 0.743294 0.660595) (xy 0.689164 0.718859) (xy 0.617677 0.794018) (xy 0.530916 0.88391) (xy 0.430966 0.986376)
(xy 0.319912 1.099255) (xy 0.199837 1.220388) (xy 0.079018 1.341432) (xy -0.068553 1.488649) (xy -0.194584 1.613993)
(xy -0.300929 1.719187) (xy -0.389441 1.805953) (xy -0.461972 1.876011) (xy -0.520375 1.931085)
(xy -0.566502 1.972895) (xy -0.602206 2.003165) (xy -0.629341 2.023614) (xy -0.649758 2.035967)
(xy -0.665311 2.041943) (xy -0.676195 2.043296) (xy -0.729131 2.030305) (xy -0.762954 1.999525)
(xy -0.78715 1.958699) (xy -0.797382 1.921442) (xy -0.797384 1.921072) (xy -0.785944 1.903496) (xy -0.753276 1.865149)
(xy -0.70186 1.808537) (xy -0.634176 1.736167) (xy -0.552705 1.650545) (xy -0.459926 1.554176) (xy -0.358319 1.449568)
(xy -0.250365 1.339225) (xy -0.138542 1.225655) (xy -0.025332 1.111363) (xy 0.086786 0.998856) (xy 0.195332 0.890639)
(xy 0.297826 0.789218) (xy 0.391789 0.697101) (xy 0.474739 0.616792) (xy 0.544197 0.550798) (xy 0.597683 0.501625)
(xy 0.632717 0.471779) (xy 0.644655 0.463834) (xy 0.696751 0.458582)
)
(stroke
(width 0)
(type solid)
)
(fill solid)
(layer "F.SilkS")
(uuid "4f98e730-28a7-4678-b03d-dd19d50d3be6")
)
(fp_poly
(pts
(xy 0.486771 -3.93074) (xy 0.527893 -3.911223) (xy 0.549697 -3.890244) (xy 0.560901 -3.859854) (xy 0.564663 -3.809709)
(xy 0.564813 -3.790316) (xy 0.560846 -3.728601) (xy 0.546613 -3.669363) (xy 0.518622 -3.599756)
(xy 0.505207 -3.571147) (xy 0.465632 -3.477346) (xy 0.447577 -3.3987) (xy 0.451093 -3.325008) (xy 0.476233 -3.246069)
(xy 0.50721 -3.181297) (xy 0.536817 -3.122468) (xy 0.554379 -3.077694) (xy 0.562552 -3.034473) (xy 0.563992 -2.980305)
(xy 0.562161 -2.922678) (xy 0.557153 -2.844046) (xy 0.547412 -2.785322) (xy 0.529785 -2.733229)
(xy 0.504936 -2.681734) (xy 0.475258 -2.616076) (xy 0.451718 -2.547934) (xy 0.44166 -2.50454) (xy 0.420317 -2.438843)
(xy 0.382963 -2.394467) (xy 0.335899 -2.373917) (xy 0.285427 -2.379697) (xy 0.237848 -2.414313)
(xy 0.232076 -2.421223) (xy 0.206221 -2.480643) (xy 0.206853 -2.559845) (xy 0.233945 -2.658594)
(xy 0.273695 -2.749585) (xy 0.312613 -2.83901) (xy 0.3301 -2.913678) (xy 0.326049 -2.98431) (xy 0.300354 -3.061628)
(xy 0.269947 -3.124482) (xy 0.238114 -3.188388) (xy 0.219549 -3.237852) (xy 0.210825 -3.287072)
(xy 0.208515 -3.350245) (xy 0.20859 -3.37863) (xy 0.210687 -3.451702) (xy 0.218167 -3.506346) (xy 0.234635 -3.557311)
(xy 0.263696 -3.619345) (xy 0.270886 -3.633497) (xy 0.300134 -3.696554) (xy 0.321808 -3.754418)
(xy 0.331947 -3.796239) (xy 0.332243 -3.801531) (xy 0.345668 -3.86335) (xy 0.380921 -3.908307) (xy 0.430466 -3.932179)
)
(stroke
(width 0)
(type solid)
)
(fill solid)
(layer "F.SilkS")
(uuid "e7f4bbcf-3618-40d9-b334-658d13e603e5")
)
(fp_poly
(pts
(xy -0.285746 -3.933069) (xy -0.238125 -3.898622) (xy -0.232077 -3.8914) (xy -0.206221 -3.83198)
(xy -0.206854 -3.752778) (xy -0.233945 -3.65403) (xy -0.273696 -3.563038) (xy -0.312614 -3.473611)
(xy -0.330102 -3.398945) (xy -0.326051 -3.328321) (xy -0.300356 -3.251021) (xy -0.269948 -3.188187)
(xy -0.23808 -3.124201) (xy -0.219485 -3.074581) (xy -0.210713 -3.0251) (xy -0.208315 -2.96153)
(xy -0.20834 -2.934039) (xy -0.210198 -2.861659) (xy -0.217253 -2.808102) (xy -0.233052 -2.75901)
(xy -0.26114 -2.700023) (xy -0.270636 -2.681785) (xy -0.30029 -2.618996) (xy -0.322127 -2.560757)
(xy -0.332039 -2.518275) (xy -0.332244 -2.513751) (xy -0.345437 -2.450851) (xy -0.380182 -2.405043)
(xy -0.429224 -2.380494) (xy -0.485308 -2.381369) (xy -0.527893 -2.4014) (xy -0.549697 -2.42238)
(xy -0.560901 -2.45277) (xy -0.564664 -2.502914) (xy -0.564814 -2.522307) (xy -0.560846 -2.584022)
(xy -0.546614 -2.64326) (xy -0.518623 -2.712868) (xy -0.505208 -2.741476) (xy -0.465634 -2.835255)
(xy -0.44757 -2.913858) (xy -0.451074 -2.987477) (xy -0.476202 -3.066306) (xy -0.507393 -3.131393)
(xy -0.53635 -3.188501) (xy -0.55387 -3.231914) (xy -0.562348 -3.273345) (xy -0.564181 -3.324507)
(xy -0.561761 -3.39711) (xy -0.561756 -3.397242) (xy -0.556962 -3.475131) (xy -0.548656 -3.531518)
(xy -0.534019 -3.578117) (xy -0.510238 -3.626644) (xy -0.50385 -3.638118) (xy -0.473376 -3.702127)
(xy -0.449801 -3.769547) (xy -0.441164 -3.808083) (xy -0.420229 -3.873702) (xy -0.383128 -3.918087)
(xy -0.33619 -3.938717)
)
(stroke
(width 0)
(type solid)
)
(fill solid)
(layer "F.SilkS")
(uuid "3b4f9182-d155-46f5-bae6-c67190cb17e5")
)
(fp_poly
(pts
(xy -1.065685 -3.931384) (xy -1.016251 -3.898609) (xy -1.014113 -3.896373) (xy -0.985764 -3.842311)
(xy -0.981774 -3.767888) (xy -1.001921 -3.675103) (xy -1.045985 -3.565951) (xy -1.051815 -3.553978)
(xy -1.080695 -3.489554) (xy -1.102233 -3.430127) (xy -1.112609 -3.386557) (xy -1.113015 -3.37996)
(xy -1.105695 -3.341592) (xy -1.086286 -3.284879) (xy -1.058616 -3.220641) (xy -1.051356 -3.205679)
(xy -1.021179 -3.142231) (xy -1.002797 -3.092454) (xy -0.993265 -3.043413) (xy -0.98964 -2.982173)
(xy -0.989065 -2.932047) (xy -0.989644 -2.858273) (xy -0.993998 -2.805695) (xy -1.004931 -2.762298)
(xy -1.025249 -2.716068) (xy -1.050724 -2.667902) (xy -1.081738 -2.604004) (xy -1.10388 -2.545147)
(xy -1.112975 -2.502547) (xy -1.113015 -2.500523) (xy -1.127251 -2.445459) (xy -1.163872 -2.40118)
(xy -1.21375 -2.377303) (xy -1.231628 -2.37554) (xy -1.271999 -2.387333) (xy -1.311115 -2.415747)
(xy -1.311591 -2.41625) (xy -1.339939 -2.470313) (xy -1.34393 -2.544735) (xy -1.323783 -2.63752)
(xy -1.279718 -2.746672) (xy -1.273889 -2.758645) (xy -1.245009 -2.823069) (xy -1.223471 -2.882496)
(xy -1.213094 -2.926066) (xy -1.212688 -2.932663) (xy -1.220009 -2.971032) (xy -1.239418 -3.027744)
(xy -1.267088 -3.091982) (xy -1.274348 -3.106944) (xy -1.304525 -3.170394) (xy -1.322908 -3.220174)
(xy -1.33244 -3.269219) (xy -1.336067 -3.330466) (xy -1.336643 -3.380576) (xy -1.335994 -3.454892)
(xy -1.331663 -3.507241) (xy -1.321211 -3.548856) (xy -1.302198 -3.590969) (xy -1.28362 -3.624769)
(xy -1.252856 -3.687442) (xy -1.2289 -3.751406) (xy -1.219165 -3.79089) (xy -1.197845 -3.861397)
(xy -1.161688 -3.9101) (xy -1.115899 -3.934322)
)
(stroke
(width 0)
(type solid)
)
(fill solid)
(layer "F.SilkS")
(uuid "5b394159-9d6b-4e54-a485-0f9496d85ee2")
)
(fp_poly
(pts
(xy 1.260018 -3.931384) (xy 1.309452 -3.898609) (xy 1.31159 -3.896373) (xy 1.339939 -3.842311) (xy 1.343929 -3.767888)
(xy 1.323783 -3.675103) (xy 1.279718 -3.565951) (xy 1.273888 -3.553978) (xy 1.245008 -3.489554)
(xy 1.22347 -3.430127) (xy 1.213094 -3.386557) (xy 1.212688 -3.37996) (xy 1.220008 -3.341592) (xy 1.239417 -3.284879)
(xy 1.267088 -3.220641) (xy 1.274347 -3.205679) (xy 1.304524 -3.142231) (xy 1.322906 -3.092454)
(xy 1.332438 -3.043413) (xy 1.336063 -2.982173) (xy 1.336638 -2.932047) (xy 1.336059 -2.858273)
(xy 1.331705 -2.805695) (xy 1.320772 -2.762298) (xy 1.300454 -2.716068) (xy 1.274979 -2.667902)
(xy 1.243965 -2.604004) (xy 1.221823 -2.545147) (xy 1.212728 -2.502547) (xy 1.212688 -2.500523)
(xy 1.198452 -2.445459) (xy 1.161831 -2.40118) (xy 1.111953 -2.377303) (xy 1.094075 -2.37554) (xy 1.053704 -2.387333)
(xy 1.014589 -2.415747) (xy 1.014112 -2.41625) (xy 0.985764 -2.470313) (xy 0.981773 -2.544735) (xy 1.00192 -2.63752)
(xy 1.045985 -2.746672) (xy 1.051814 -2.758645) (xy 1.080695 -2.823069) (xy 1.102232 -2.882496)
(xy 1.112609 -2.926066) (xy 1.113015 -2.932663) (xy 1.105694 -2.971032) (xy 1.086285 -3.027744)
(xy 1.058615 -3.091982) (xy 1.051355 -3.106944) (xy 1.021178 -3.170394) (xy 1.002795 -3.220174)
(xy 0.993263 -3.269219) (xy 0.989636 -3.330466) (xy 0.98906 -3.380576) (xy 0.989709 -3.454892) (xy 0.99404 -3.507241)
(xy 1.004492 -3.548856) (xy 1.023505 -3.590969) (xy 1.042083 -3.624769) (xy 1.072847 -3.687442)
(xy 1.096803 -3.751406) (xy 1.106538 -3.79089) (xy 1.127858 -3.861397) (xy 1.164016 -3.9101) (xy 1.209804 -3.934322)
)
(stroke
(width 0)
(type solid)
)
(fill solid)
(layer "F.SilkS")
(uuid "3c371b7d-331f-487a-8166-4950056e7a1b")
)
(fp_poly
(pts
(xy 0.122847 -2.04702) (xy 0.248034 -2.044361) (xy 0.36707 -2.040298) (xy 0.471467 -2.03513) (xy 0.552738 -2.02916)
(xy 0.564813 -2.027964) (xy 0.91212 -1.98183) (xy 1.232503 -1.919063) (xy 1.5256 -1.839801) (xy 1.791047 -1.744183)
(xy 2.028482 -1.632349) (xy 2.237541 -1.504437) (xy 2.417861 -1.360585) (xy 2.486698 -1.293629)
(xy 2.600508 -1.154546) (xy 2.684165 -1.005317) (xy 2.737062 -0.848463) (xy 2.75859 -0.686505) (xy 2.748142 -0.521966)
(xy 2.709422 -0.369483) (xy 2.647875 -0.224984) (xy 2.565218 -0.088312) (xy 2.457227 0.046919) (xy 2.379692 0.128841)
(xy 2.242642 0.266269) (xy 2.242642 2.065556) (xy 2.242642 3.864843) (xy 2.204194 3.900963) (xy 2.165746 3.937083)
(xy -0.002328 3.937083) (xy -2.170402 3.937083) (xy -2.206522 3.898635) (xy -2.242643 3.860187)
(xy -2.242643 2.062222) (xy -2.242643 0.264257) (xy -2.373549 0.136282) (xy -2.513549 -0.018327)
(xy -2.622363 -0.177298) (xy -2.699706 -0.339402) (xy -2.745295 -0.503407) (xy -2.757503 -0.651759)
(xy -2.524697 -0.651759) (xy -2.508898 -0.516082) (xy -2.461125 -0.378973) (xy -2.381144 -0.239797)
(xy -2.268716 -0.097917) (xy -2.123606 0.047301) (xy -2.08898 0.078262) (xy -2.010072 0.147568)
(xy -2.010072 1.92604) (xy -2.010072 3.704512) (xy 0 3.704512) (xy 2.010072 3.704512) (xy 2.010072 1.924745)
(xy 2.010072 0.144977) (xy 2.088979 0.076741) (xy 2.229085 -0.054234) (xy 2.33944 -0.17988) (xy 2.422407 -0.303385)
(xy 2.48035 -0.427935) (xy 2.494513 -0.47024) (xy 2.520879 -0.609973) (xy 2.515132 -0.74685) (xy 2.478331 -0.879877)
(xy 2.411537 -1.008056) (xy 2.315809 -1.130391) (xy 2.192207 -1.245887) (xy 2.041789 -1.353546)
(xy 1.865616 -1.452373) (xy 1.664747 -1.541372) (xy 1.440242 -1.619546) (xy 1.204382 -1.683268)
(xy 1.063124 -1.715253) (xy 0.934055 -1.741094) (xy 0.81099 -1.761393) (xy 0.687746 -1.776757) (xy 0.558139 -1.787789)
(xy 0.415987 -1.795096) (xy 0.255104 -1.79928) (xy 0.069309 -1.800947) (xy 0 -1.801048) (xy -0.155616 -1.800819)
(xy -0.283242 -1.799968) (xy -0.388115 -1.798243) (xy -0.475468 -1.795394) (xy -0.550534 -1.791171)
(xy -0.618548 -1.785324) (xy -0.684744 -1.777603) (xy -0.754356 -1.767757) (xy -0.780772 -1.763719)
(xy -1.099692 -1.705161) (xy -1.388553 -1.632955) (xy -1.647628 -1.547008) (xy -1.877192 -1.447228)
(xy -2.07752 -1.333521) (xy -2.109745 -1.312079) (xy -2.209212 -1.234167) (xy -2.304131 -1.141371)
(xy -2.386645 -1.042423) (xy -2.448895 -0.946057) (xy -2.461326 -0.921362) (xy -2.508761 -0.786641)
(xy -2.524697 -0.651759) (xy -2.757503 -0.651759) (xy -2.758846 -0.668082) (xy -2.740073 -0.832197)
(xy -2.688694 -0.994521) (xy -2.652343 -1.071485) (xy -2.605402 -1.144462) (xy -2.53732 -1.228681)
(xy -2.454825 -1.317296) (xy -2.364645 -1.403462) (xy -2.273509 -1.480335) (xy -2.195127 -1.536629)
(xy -1.974687 -1.661297) (xy -1.725922 -1.769851) (xy -1.449707 -1.862027) (xy -1.146914 -1.937561)
(xy -0.81842 -1.996191) (xy -0.564814 -2.027964) (xy -0.488873 -2.034053) (xy -0.388199 -2.039396)
(xy -0.271281 -2.043691) (xy -0.146607 -2.046638) (xy -0.022666 -2.047937) (xy 0 -2.047973)
)
(stroke
(width 0)
(type solid)
)
(fill solid)
(layer "F.SilkS")
(uuid "397348ab-5c52-413c-8813-ef3d186d043e")
)
(fp_poly
(pts
(xy 0.080758 -1.649632) (xy 0.307529 -1.640957) (xy 0.53075 -1.625074) (xy 0.741495 -1.60227) (xy 0.863832 -1.584482)
(xy 1.088874 -1.540985) (xy 1.305381 -1.485705) (xy 1.509836 -1.42017) (xy 1.698725 -1.345909) (xy 1.868531 -1.264451)
(xy 2.015739 -1.177324) (xy 2.136832 -1.086059) (xy 2.228295 -0.992183) (xy 2.229618 -0.990518)
(xy 2.288833 -0.907563) (xy 2.32576 -0.83202) (xy 2.344768 -0.751476) (xy 2.350228 -0.653513) (xy 2.350223 -0.647875)
(xy 2.348386 -0.571565) (xy 2.341773 -0.516249) (xy 2.32796 -0.469779) (xy 2.304942 -0.420803) (xy 2.233217 -0.30759)
(xy 2.137505 -0.192589) (xy 2.025376 -0.084414) (xy 1.968332 -0.037742) (xy 1.844136 0.058142) (xy 1.844043 1.762146)
(xy 1.84395 3.466151) (xy 1.805502 3.502271) (xy 1.767054 3.538391) (xy -0.002328 3.538391) (xy -1.77171 3.538391)
(xy -1.807831 3.499943) (xy -1.843951 3.461495) (xy -1.844044 1.759818) (xy -1.844137 0.058142)
(xy -1.968332 -0.037742) (xy -2.08353 -0.137567) (xy -2.185949 -0.247521) (xy -2.26837 -0.359359)
(xy -2.303644 -0.420803) (xy -2.340313 -0.5218) (xy -2.356728 -0.633245) (xy -2.353996 -0.693492)
(xy -2.120606 -0.693492) (xy -2.117673 -0.611573) (xy -2.085042 -0.521437) (xy -2.024418 -0.425713)
(xy -1.937507 -0.327029) (xy -1.826016 -0.228014) (xy -1.810711 -0.215958) (xy -1.749703 -0.167997)
(xy -1.695943 -0.124799) (xy -1.656557 -0.092142) (xy -1.641626 -0.078908) (xy -1.636699 -0.073017)
(xy -1.632337 -0.06409) (xy -1.628506 -0.05019) (xy -1.625172 -0.029379) (xy -1.622299 0.00028)
(xy -1.619854 0.040724) (xy -1.617803 0.09389) (xy -1.616111 0.161714) (xy -1.614744 0.246136) (xy -1.613668 0.34909)
(xy -1.612847 0.472515) (xy -1.612249 0.618348) (xy -1.611838 0.788526) (xy -1.61158 0.984985) (xy -1.611441 1.209664)
(xy -1.611387 1.464499) (xy -1.61138 1.627992) (xy -1.61138 3.30582) (xy 0 3.30582) (xy 1.61138 3.30582)
(xy 1.61138 1.627992) (xy 1.611401 1.354655) (xy 1.611486 1.112606) (xy 1.61167 0.899907) (xy 1.611987 0.71462)
(xy 1.612472 0.55481) (xy 1.613159 0.418538) (xy 1.614082 0.303867) (xy 1.615275 0.208861) (xy 1.616773 0.131582)
(xy 1.618611 0.070094) (xy 1.620821 0.022458) (xy 1.62344 -0.013262) (xy 1.626501 -0.039004) (xy 1.630038 -0.056703)
(xy 1.634085 -0.068299) (xy 1.638678 -0.075727) (xy 1.641626 -0.078908) (xy 1.667173 -0.101103)
(xy 1.711938 -0.137765) (xy 1.768795 -0.183117) (xy 1.81071 -0.215958) (xy 1.925103 -0.314832) (xy 2.015124 -0.413698)
(xy 2.079068 -0.509928) (xy 2.11523 -0.600892) (xy 2.121903 -0.683962) (xy 2.120605 -0.693492) (xy 2.091129 -0.775931)
(xy 2.030913 -0.858552) (xy 1.942404 -0.939995) (xy 1.82805 -1.018901) (xy 1.690299 -1.093911) (xy 1.531599 -1.163665)
(xy 1.354399 -1.226803) (xy 1.161145 -1.281965) (xy 0.991746 -1.32043) (xy 0.674569 -1.371829) (xy 0.340058 -1.402595)
(xy -0.003081 -1.412728) (xy -0.346142 -1.402226) (xy -0.680419 -1.371091) (xy -0.991746 -1.32043)
(xy -1.195564 -1.273022) (xy -1.385605 -1.216486) (xy -1.559397 -1.152196) (xy -1.714463 -1.081526)
(xy -1.848328 -1.00585) (xy -1.958518 -0.926545) (xy -2.042558 -0.844983) (xy -2.097972 -0.76254)
(xy -2.120606 -0.693492) (xy -2.353996 -0.693492) (xy -2.351786 -0.742226) (xy -2.336505 -0.805909)
(xy -2.280302 -0.920976) (xy -2.192867 -1.030719) (xy -2.075878 -1.13437) (xy -1.931012 -1.231166)
(xy -1.759948 -1.32034) (xy -1.564363 -1.401127) (xy -1.345935 -1.47276) (xy -1.106342 -1.534475)
(xy -0.847262 -1.585506) (xy -0.570373 -1.625087) (xy -0.53159 -1.629526) (xy -0.347727 -1.644205)
(xy -0.140636 -1.650811)
)
(stroke
(width 0)
(type solid)
)
(fill solid)
(layer "F.SilkS")
(uuid "90cc2537-0acd-482e-a478-174d613215f0")
)
)
(footprint "824501241:DIOM5127X250N"
(layer "F.Cu")
(uuid "9eab8db0-4919-4e0c-b7ba-c34c2e8c2084")
@ -146921,19 +146584,6 @@
(justify left bottom)
)
)
(gr_text "might get toasty"
(at 256.06 158.74 0)
(layer "F.SilkS" knockout)
(uuid "b5d190fe-882b-4a4c-bec8-951082c287ec")
(effects
(font
(size 1.5 1.5)
(thickness 0.3)
(bold yes)
)
(justify left bottom)
)
)
(gr_text "8"
(at 260.6 135 0)
(layer "F.SilkS")

View File

@ -29,5 +29,6 @@ typedef struct {
void can_init(CAN_HandleTypeDef* hcan);
void can_rxupdateFrame();
void can_sendloop();
void can_error_report();
#endif /* INC_CAN_COMMUNICATION_H_ */

View File

@ -11,7 +11,7 @@
#include "stm32f3xx_hal.h"
// convert ADC quants to V
#define ADC_V_FACTOR (3.3f / 4095) // 3.3V / 12bit
#define ADC_V_FACTOR ((3.3f / 4095) * (3.3f / 3.14f)) // 3.3V / 12bit
// scale to LV by divider to mV
#define LV_SENSE_FACTOR (1e3 * (ADC_V_FACTOR * ((12.f + 1.8f) / 1.8f))) // scaled with voltage divider

View File

@ -12,6 +12,42 @@
#include "channel_control.h"
#include "can_communication.h"
typedef union {
struct {
uint8_t sdc_open : 1;
uint8_t noload_acc_cooling : 1;
uint8_t noload_ts_cooling : 1;
uint8_t noload_drs : 1;
uint8_t noload_acu : 1;
uint8_t noload_epsc : 1;
uint8_t noload_inverter : 1;
uint8_t noload_lidar : 1;
};
uint8_t group1;
} err_group1;
typedef union {
struct {
uint8_t noload_misc : 1;
uint8_t noload_alwayson : 1;
uint8_t noload_sdc : 1;
uint8_t noload_ebs1 : 1;
uint8_t noload_ebs2 : 1;
uint8_t noload_ebs3 : 1;
uint8_t power_critcal : 1;
uint8_t power_limit : 1;
};
uint8_t group2;
} err_group2;
typedef union {
struct {
err_group1 group1;
err_group2 group2;
};
uint16_t err_bitmask;
} err_states;
void check_plausibility();
#endif /* INC_PLAUSIBILITY_CHECK_H_ */

View File

@ -14,7 +14,7 @@ rx_status_frame rxstate = {};
volatile uint8_t canmsg_received = 0;
extern enable_gpios update_ports;
extern current_measurements current_measurements_adc_val;
extern uint8_t error_data[16];
extern err_states error;
extern uint32_t lastheartbeat;
@ -93,39 +93,10 @@ void can_sendloop(){
}
void can_error_report(){
static int error_loop = 0;
uint8_t data[8];
switch (error_loop){
case 0: // 1 = error 0 = no error
data[0] = error_data[0]; // SDC-Status
data[1] = error_data[1]; // power draw critical (550W)
data[2] = error_data[2]; // power limit (> 600W)
data[3] = error_data[3]; // acc-cooling false OFF
data[4] = error_data[4]; // ts-cooling false OFF
data[5] = error_data[5]; // drs false OFF
data[6] = error_data[6]; // acu false OFF
data[7] = error_data[7]; // epsc false OFF
ftcan_transmit(ERROR_ID, data, 8);
break;
case 1: // 3 = error 2 = no error
data[8] = error_data[8]; // inverter false OFF
data[9] = error_data[9]; // lidar false OFF
data[10] = error_data[10]; // misc false OFF
data[11] = error_data[11]; // always on false OFF
data[12] = error_data[12]; // sdc false OFF
data[13] = error_data[13]; // ebs1 false OFF
data[14] = error_data[14]; // ebs2 false OFF
data[15] = error_data[15]; // ebs3 false OFF
ftcan_transmit(ERROR_ID, data, 8);
break;
default:
break;
}
error_loop = (error_loop + 1) % 2;
uint8_t error_data[2];
error_data[0] = error.group1.group1;
error_data[1] = error.group2.group2;
ftcan_transmit(ERROR_ID, error_data, 2);
}
void ftcan_msg_received_cb(uint16_t id, size_t datalen, const uint8_t* data){

View File

@ -25,7 +25,7 @@ void ChannelControl_init(){
void ChannelControl_UpdateGPIOs(enable_gpios UpdatePorts){
UpdatePorts.portb.alwayson = 1;
UpdatePorts.portb.alwayson = 1; // ensure always on stays always on
if (inhibit_SDC == 1){
UpdatePorts.portb.sdc = 0;
HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin, 1);
@ -37,11 +37,9 @@ void ChannelControl_UpdateGPIOs(enable_gpios UpdatePorts){
if (prev_epsc_state == 0 && UpdatePorts.porta.epsc == 1){
HAL_GPIO_WritePin(PC_EN_GPIO_Port, PC_EN_Pin, 1); // enable precharge
HAL_GPIO_WritePin(LED3_GPIO_Port, LED3_Pin, 1);
if (current_measurements_adc_val.epsc_precharge >= (0.95f * current_measurements_adc_val.asms_v)) { // precharge complete
HAL_GPIO_WritePin(IN5_GPIO_Port, IN5_Pin, (GPIO_PinState)UpdatePorts.porta.epsc); // switch PROFET
if (current_measurements_adc_val.epsc_precharge >= (0.95f * current_measurements_adc_val.asms_v)) { // check if precharge is complete (no while loop needed, this function is called by the main while-loop)
HAL_GPIO_WritePin(IN5_GPIO_Port, IN5_Pin, (GPIO_PinState)UpdatePorts.porta.epsc); // switch on PROFET
HAL_GPIO_WritePin(PC_EN_GPIO_Port, PC_EN_Pin, 0); // disengage precharge
HAL_GPIO_WritePin(LED3_GPIO_Port, LED3_Pin, 0);
prev_epsc_state = UpdatePorts.porta.epsc;
}
}
@ -54,8 +52,8 @@ void ChannelControl_UpdateGPIOs(enable_gpios UpdatePorts){
HAL_GPIO_WritePin(IN6_GPIO_Port, IN6_Pin, (GPIO_PinState)UpdatePorts.porta.inverter); // inverter
HAL_GPIO_WritePin(IN7_GPIO_Port, IN7_Pin, (GPIO_PinState)UpdatePorts.porta.lidar); // lidar
HAL_GPIO_WritePin(IN8_GPIO_Port, IN8_Pin, (GPIO_PinState)UpdatePorts.porta.misc); // MISC
HAL_GPIO_WritePin(IN9_GPIO_Port, IN9_Pin, (GPIO_PinState)UpdatePorts.portb.alwayson); // always on -> standardmäßig auf HIGH forcen
HAL_GPIO_WritePin(IN10_GPIO_Port, IN10_Pin, (GPIO_PinState)UpdatePorts.portb.sdc); // SDC -> muss anders controlled werden
HAL_GPIO_WritePin(IN9_GPIO_Port, IN9_Pin, (GPIO_PinState)UpdatePorts.portb.alwayson); // always on
HAL_GPIO_WritePin(IN10_GPIO_Port, IN10_Pin, (GPIO_PinState)UpdatePorts.portb.sdc); // SDC
HAL_GPIO_WritePin(IN11_GPIO_Port, IN11_Pin, (GPIO_PinState)UpdatePorts.portb.ebs1); // EBS 1
HAL_GPIO_WritePin(IN12_GPIO_Port, IN12_Pin, (GPIO_PinState)UpdatePorts.portb.ebs2); // EBS 2
HAL_GPIO_WritePin(IN13_GPIO_Port, IN13_Pin, (GPIO_PinState)UpdatePorts.portb.ebs3); // EBS 3

View File

@ -23,7 +23,7 @@
/* USER CODE BEGIN Includes */
#include "can_communication.h"
#include "channel_control.h"
//#include "plausibility_check.h"
#include "plausibility_check.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
@ -119,6 +119,7 @@ int main(void)
MX_UART4_Init();
MX_TIM6_Init();
/* USER CODE BEGIN 2 */
// begin start-up animation
HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin, GPIO_PIN_SET);
HAL_Delay(100);
@ -142,6 +143,7 @@ int main(void)
HAL_GPIO_WritePin(LED3_GPIO_Port, LED3_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(LED4_GPIO_Port, LED4_Pin, GPIO_PIN_RESET);
// end start-up animation
HAL_GPIO_WritePin(LED4_GPIO_Port, LED4_Pin, GPIO_PIN_SET); // indicates running STM
ChannelControl_init();
@ -167,8 +169,9 @@ int main(void)
}
if ((HAL_GetTick() - lasttick) > 100u){
lasttick = HAL_GetTick();
check_plausibility();
can_sendloop();
//can_error_report();
can_error_report();
}
if (((HAL_GetTick() - lastheartbeat) > 200U) && (HAL_GetTick() > 1000U)) {
inhibit_SDC = 1;
@ -176,12 +179,10 @@ int main(void)
HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin, (GPIO_PinState)!update_ports.portb.sdc); // indicates open SDC
HAL_GPIO_WritePin(LED2_GPIO_Port, LED2_Pin, (GPIO_PinState)inhibit_SDC); // indicates watchdog-status
// overcurrent check (wenn funktioniert, LED schalten)
ChannelControl_UpdateGPIOs(update_ports);
current_monitor_checklimits(); // currently not implemented
//check_plausibility();
}
/* USER CODE END 3 */
}

View File

@ -8,102 +8,103 @@
extern enable_gpios update_ports;
extern current_measurements current_measurements_adc_val;
volatile uint8_t error_data[16];
volatile err_states error;
extern int inhibit_SDC;
void check_plausibility() {
if (!update_ports.portb.sdc) {error_data[0] = 1;}
else {error_data[0] = 0;}
if (!update_ports.portb.sdc || inhibit_SDC == 1) {error.group1.sdc_open = 1;}
else {error.group1.sdc_open = 0;}
if (update_ports.porta.acc_cooling == 1 && current_measurements_adc_val.acc_cooling == 0) {
error_data[3] = 1;
error.group1.noload_acc_cooling = 1;
}
else {
error_data[3] = 0;
error.group1.noload_acc_cooling = 0;
}
if (update_ports.porta.ts_cooling == 1 && current_measurements_adc_val.ts_cooling == 0) {
error_data[4] = 1;
}
else {
error_data[4] = 0;
}
error.group1.noload_ts_cooling = 1;
}
else {
error.group1.noload_ts_cooling = 0;
}
if (update_ports.porta.drs == 1 && current_measurements_adc_val.drs == 0) {
error_data[5] = 1;
}
else {
error_data[5] = 0;
}
error.group1.noload_drs = 1;
}
else {
error.group1.noload_drs = 0;
}
if (update_ports.porta.acu == 1 && current_measurements_adc_val.acu == 0) {
error_data[6] = 1;
}
else {
error_data[6] = 0;
}
error.group1.noload_acu = 1;
}
else {
error.group1.noload_acu = 0;
}
if (update_ports.porta.epsc == 1 && current_measurements_adc_val.epsc == 0) {
error_data[7] = 1;
}
else {
error_data[7] = 0;
}
error.group1.noload_epsc = 1;
}
else {
error.group1.noload_epsc = 0;
}
if (update_ports.porta.inverter == 1 && current_measurements_adc_val.inverter == 0) {
error_data[8] = 3;
}
else {
error_data[8] = 2;
}
error.group1.noload_inverter = 1;
}
else {
error.group1.noload_inverter = 0;
}
if (update_ports.porta.lidar == 1 && current_measurements_adc_val.lidar == 0) {
error_data[9] = 3;
}
else {
error_data[9] = 2;
}
error.group1.noload_lidar = 1;
}
else {
error.group1.noload_lidar = 0;
}
if (update_ports.porta.misc == 1 && current_measurements_adc_val.misc == 0) {
error_data[10] = 3;
}
else {
error_data[10] = 2;
}
error.group2.noload_misc = 1;
}
else {
error.group2.noload_misc = 0;
}
if (update_ports.portb.alwayson == 1 && current_measurements_adc_val.alwayson == 0) {
error_data[11] = 3;
}
else {
error_data[11] = 2;
}
error.group2.noload_alwayson = 1;
}
else {
error.group2.noload_alwayson = 0;
}
if (update_ports.portb.sdc == 1 && current_measurements_adc_val.sdc == 0) {
error_data[12] = 3;
}
else {
error_data[12] = 2;
}
error.group2.noload_sdc = 1;
}
else {
error.group2.noload_sdc = 0;
}
if (update_ports.portb.ebs1 == 1 && current_measurements_adc_val.ebs1 == 0) {
error_data[13] = 3;
}
else {
error_data[13] = 2;
}
error.group2.noload_ebs1 = 1;
}
else {
error.group2.noload_ebs1 = 0;
}
if (update_ports.portb.ebs2 == 1 && current_measurements_adc_val.ebs2 == 0) {
error_data[14] = 3;
}
else {
error_data[14] = 2;
}
error.group2.noload_ebs2 = 1;
}
else {
error.group2.noload_ebs2 = 0;
}
if (update_ports.portb.ebs3 == 1 && current_measurements_adc_val.ebs3 == 0) {
error_data[15] = 3;
}
else {
error_data[15] = 2;
}
error.group2.noload_ebs3 = 1;
}
else {
error.group2.noload_ebs3 = 0;
}
}

View File

@ -1,4 +1,4 @@
../Core/Src/can_communication.c:23:6:can_init 1
../Core/Src/can_communication.c:28:6:can_sendloop 5
../Core/Src/can_communication.c:95:6:can_error_report 3
../Core/Src/can_communication.c:131:6:ftcan_msg_received_cb 4
../Core/Src/can_communication.c:95:6:can_error_report 1
../Core/Src/can_communication.c:102:6:ftcan_msg_received_cb 4

View File

@ -1,4 +1,4 @@
../Core/Src/can_communication.c:23:6:can_init 16 static
../Core/Src/can_communication.c:28:6:can_sendloop 24 static
../Core/Src/can_communication.c:95:6:can_error_report 16 static
../Core/Src/can_communication.c:131:6:ftcan_msg_received_cb 24 static
../Core/Src/can_communication.c:102:6:ftcan_msg_received_cb 24 static

View File

@ -1,10 +1,10 @@
../Core/Src/main.c:90:5:main 5
../Core/Src/main.c:193:6:SystemClock_Config 4
../Core/Src/main.c:241:13:MX_ADC1_Init 11
../Core/Src/main.c:370:13:MX_ADC2_Init 8
../Core/Src/main.c:472:13:MX_CAN_Init 2
../Core/Src/main.c:509:13:MX_TIM6_Init 3
../Core/Src/main.c:547:13:MX_UART4_Init 2
../Core/Src/main.c:580:13:MX_DMA_Init 1
../Core/Src/main.c:602:13:MX_GPIO_Init 1
../Core/Src/main.c:665:6:Error_Handler 1
../Core/Src/main.c:194:6:SystemClock_Config 4
../Core/Src/main.c:242:13:MX_ADC1_Init 11
../Core/Src/main.c:371:13:MX_ADC2_Init 8
../Core/Src/main.c:473:13:MX_CAN_Init 2
../Core/Src/main.c:510:13:MX_TIM6_Init 3
../Core/Src/main.c:548:13:MX_UART4_Init 2
../Core/Src/main.c:581:13:MX_DMA_Init 1
../Core/Src/main.c:603:13:MX_GPIO_Init 1
../Core/Src/main.c:666:6:Error_Handler 1

View File

@ -34,7 +34,8 @@ Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_uart_ex.h \
../Core/Inc/can_communication.h ../Core/Inc/channel_control.h \
../Core/Inc/can_halal.h ../Core/Inc/current_monitoring.h \
../Core/Inc/channel_control.h
../Core/Inc/channel_control.h ../Core/Inc/plausibility_check.h \
../Core/Inc/can_communication.h
../Core/Inc/main.h:
../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h:
../Core/Inc/stm32f3xx_hal_conf.h:
@ -74,3 +75,5 @@ Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
../Core/Inc/can_halal.h:
../Core/Inc/current_monitoring.h:
../Core/Inc/channel_control.h:
../Core/Inc/plausibility_check.h:
../Core/Inc/can_communication.h:

Binary file not shown.

View File

@ -1,10 +1,10 @@
../Core/Src/main.c:90:5:main 16 static
../Core/Src/main.c:193:6:SystemClock_Config 120 static
../Core/Src/main.c:241:13:MX_ADC1_Init 48 static
../Core/Src/main.c:370:13:MX_ADC2_Init 32 static
../Core/Src/main.c:472:13:MX_CAN_Init 8 static
../Core/Src/main.c:509:13:MX_TIM6_Init 24 static
../Core/Src/main.c:547:13:MX_UART4_Init 8 static
../Core/Src/main.c:580:13:MX_DMA_Init 16 static
../Core/Src/main.c:602:13:MX_GPIO_Init 48 static
../Core/Src/main.c:665:6:Error_Handler 4 static,ignoring_inline_asm
../Core/Src/main.c:194:6:SystemClock_Config 120 static
../Core/Src/main.c:242:13:MX_ADC1_Init 48 static
../Core/Src/main.c:371:13:MX_ADC2_Init 32 static
../Core/Src/main.c:473:13:MX_CAN_Init 8 static
../Core/Src/main.c:510:13:MX_TIM6_Init 24 static
../Core/Src/main.c:548:13:MX_UART4_Init 8 static
../Core/Src/main.c:581:13:MX_DMA_Init 16 static
../Core/Src/main.c:603:13:MX_GPIO_Init 48 static
../Core/Src/main.c:666:6:Error_Handler 4 static,ignoring_inline_asm

View File

@ -1 +1 @@
../Core/Src/plausibility_check.c:13:6:check_plausibility 28
../Core/Src/plausibility_check.c:14:6:check_plausibility 29

View File

@ -1 +1 @@
../Core/Src/plausibility_check.c:13:6:check_plausibility 4 static
../Core/Src/plausibility_check.c:14:6:check_plausibility 4 static

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff