Hi
I am having trouble to start working with the current IPMC code. I tried many different approaches without luck. In the end, I made the simplest test I could think of, but even that seems to be crashing for me.
Here is what I did:
- got a fresh clone of the
ipmc-project
repository - removed the file
ipmc-user/user_mainfile.c
- edited the
config.xml
file to be similar (very basic changes, I left all the details and sensors out, please see attached) to what I will need - executed
compile.py
which performed the compilation without errors and returned to me some files, includinghpm1all.img
that I use to program the IPMC - programmed our IPMC with that file and activated it
- the IPMC system immediately reverted to the firmware that was previously used, which suggests me that the code is seg faulting or something.
I am probably missing something obvious. I would appreciate some feedback.
Thanks
PS: Well, it seems I cannot attach anything here. I will just add the config.xml
file below.
<?xml version="1.0" encoding="UTF-8"?>
<IPMC>
<GeneralConfig>
<DeviceID>0x12</DeviceID>
<DeviceRevision>0x00</DeviceRevision>
<ManufacturerID>0x000060</ManufacturerID>
<ProductID>0x1236</ProductID>
<ManufacturingDate>06/01/2017</ManufacturingDate>
<BoardManuf>Cirly/Addax</BoardManuf>
<BoardName>TEST_FRUFROLLBACK</BoardName>
<BoardSN>00001</BoardSN>
<BoardPN>P580050995</BoardPN>
<ProductManuf>CERN</ProductManuf>
<ProductName>IPMC-TestPAD</ProductName>
<ProductPN>PN00001</ProductPN>
<ProductSN>0000001</ProductSN>
<ProductVersion type="major">1</ProductVersion>
<ProductVersion type="minor">20</ProductVersion>
<MaxCurrent>30.0</MaxCurrent>
<MaxInternalCurrent>2.0</MaxInternalCurrent>
<!-- Hardware -->
<HandleSwitch active="LOW" inactive="HIGH" />
<!-- <ResetOnWrongHAEn /> -->
<!-- <PowerMonitoringEn /> -->
<!-- <AlertMonitoringEn />-->
<!-- Shutdown timeout in tens of ms (optional - if not defined: 10s) -->
<shutdownTimeout>0</shutdownTimeout>
<nonVolatileParams forced="false" />
</GeneralConfig>
<SerialInterfaces>
<!--
This part allows connecting the UART port to interfaces.
The ports 0 to 2 are linked to the hardware:
port 0: Edge connector (Tx: 57 / Rx: 60)
port 1: Edge connector (Tx: 58 / Rx: 61)
port 2: Optionnal UART (Tx: 75 / Rx: 76)
Warning: Enabling port 2 will automatically set the GPIOs in UART mode!
For each bord, the following name can be used:
"SOL": Serial Over Lan
"SDI": Serial Debug Interface
"PI": Payload Interface
The baudrate can be set using the baudrate param. By default,
it is configured to 115200b/s.
-->
<Connect port="0" name="SDI" baudrate="115200"/>
<!-- <Connect port="1" name="PI" baudrate="115200"/> -->
<!-- <Connect port="2" name="SOL" baudrate="115200" extended="true" /> -->
<RedirectSDItoSOL/>
</SerialInterfaces>
<PowerManagement>
<PowerONSeq>
<step>PSQ_ENABLE_SIGNAL(CFG_PAYLOAD_DCDC_EN_SIGNAL)</step>
<step>PSQ_END</step>
</PowerONSeq>
<PowerOFFSeq>
<step>PSQ_DISABLE_SIGNAL(CFG_PAYLOAD_DCDC_EN_SIGNAL)</step>
<step>PSQ_END</step>
</PowerOFFSeq>
</PowerManagement>
<LANConfig>
<MACAddr>0A:0A:0A:0A:0A:86</MACAddr>
<NetMask>255.255.255.0</NetMask>
<GatewayIP>192.138.1.3</GatewayIP>
<UseFlashedMAC />
<EnableDHCP />
<IPAddrList> <!-- Default IP Addresses (used if DHCP is not active) -->
<IPAddr slot_addr="default">192.168.1.34</IPAddr>
<IPAddr slot_addr="0x41">192.168.1.20</IPAddr>
<IPAddr slot_addr="0x42">192.168.1.21</IPAddr>
<IPAddr slot_addr="0x43">192.168.1.22</IPAddr>
<IPAddr slot_addr="0x44">192.168.1.23</IPAddr>
<IPAddr slot_addr="0x45">192.168.1.24</IPAddr>
<IPAddr slot_addr="0x46">192.168.1.25</IPAddr>
<IPAddr slot_addr="0x47">192.168.1.26</IPAddr>
<IPAddr slot_addr="0x48">192.168.1.27</IPAddr>
<IPAddr slot_addr="0x49">192.168.1.28</IPAddr>
<IPAddr slot_addr="0x4a">192.168.1.29</IPAddr>
<IPAddr slot_addr="0x4b">192.168.1.30</IPAddr>
<IPAddr slot_addr="0x4c">192.168.1.31</IPAddr>
<IPAddr slot_addr="0x4d">192.168.1.32</IPAddr>
<IPAddr slot_addr="0x4e">192.168.1.33</IPAddr>
<IPAddr slot_addr="0x4f">192.168.1.34</IPAddr>
<IPAddr slot_addr="0x50">192.168.1.35</IPAddr>
</IPAddrList>
</LANConfig>
<AMCSlots>
<AMC site="1">
<PhysicalPort>1</PhysicalPort>
<MaxCurrent>6.0</MaxCurrent>
<PowerGoodTimeout>300</PowerGoodTimeout>
<DCDCEfficiency>85</DCDCEfficiency>
</AMC>
<AMC site="2">
<PhysicalPort>2</PhysicalPort>
<MaxCurrent>6.0</MaxCurrent>
<PowerGoodTimeout>300</PowerGoodTimeout>
<DCDCEfficiency>85</DCDCEfficiency>
</AMC>
<AMC site="3">
<PhysicalPort>3</PhysicalPort>
<MaxCurrent>6.0</MaxCurrent>
<PowerGoodTimeout>300</PowerGoodTimeout>
<DCDCEfficiency>85</DCDCEfficiency>
</AMC>
</AMCSlots>
<SensorList>
<Sensors type="raw" global_define="CFG_SENSOR_MCP9801" function_name="SENSOR_MCP9801" rawType="MCP9801">
<Sensor>
<Name>Internal temp.</Name>
<Type>Temperature</Type>
<Units>degrees C</Units>
<NominalReading>25</NominalReading>
<NormalMaximum>60</NormalMaximum>
<NormalMinimum>-10</NormalMinimum>
<Point id="0" x="0" y="0" />
<Point id="1" x="5" y="5" />
<Thresholds>
<UpperNonRecovery>80</UpperNonRecovery>
<UpperCritical>60</UpperCritical>
<UpperNonCritical>40</UpperNonCritical>
<LowerNonRecovery>-20</LowerNonRecovery>
<LowerCritical>-10</LowerCritical>
<LowerNonCritical>0</LowerNonCritical>
</Thresholds>
<Params>
<p type="record_id"></p> <!-- mandatory -->
<p type="user">0x090</p>
<p type="user">UCGH | LCGL</p>
</Params>
<AssertEvMask>0x0A80</AssertEvMask>
<DeassertEvMask>0x7A80</DeassertEvMask>
<DiscreteRdMask>0x3838</DiscreteRdMask>
<AnalogDataFmt>2S_COMPL</AnalogDataFmt>
<PosHysteresis>2</PosHysteresis>
<NegHysteresis>2</NegHysteresis>
<MaxReading>127</MaxReading>
<MinReading>-128</MinReading>
</Sensor>
</Sensors>
<!-- Example for GPIO sensors:
<Sensors type="raw" global_define="CFG_SENSOR_GPIO " function_name="SENSOR_GPIO" rawType="GPIOSENSOR">
<Sensor>
<Name>GPIOSens Ex.</Name>
<Type>Processor</Type>
<Params>
<p type="record_id"></p>
<p type="user">0x1</p>
<p type="user">POWER_GOOD_12V</p>
</Params>
<DiscreteRdMask>0x000F</DiscreteRdMask>
</Sensor>
</Sensors>
-->
<!-- Example for payload sensors:
<Sensors type="raw" global_define="CFG_SENSOR_PAYLOAD_THRESHOLD" function_name="SENSOR_PAYLOAD_THRESHOLD" rawType="PAYLOADSENSOR_THRESH">
<Sensor>
<Name>PayloadSens Ex.</Name>
<Type>Temperature</Type>
<Units>degrees C</Units>
<NominalReading>25</NominalReading>
<NormalMaximum>60</NormalMaximum>
<NormalMinimum>-10</NormalMinimum>
<Point id="0" x="0" y="0" />
<Point id="1" x="5" y="5" />
<Thresholds>
<UpperNonRecovery>80</UpperNonRecovery>
<UpperCritical>60</UpperCritical>
<UpperNonCritical>40</UpperNonCritical>
<LowerNonRecovery>-20</LowerNonRecovery>
<LowerCritical>-10</LowerCritical>
<LowerNonCritical>0</LowerNonCritical>
</Thresholds>
<Params>
<p type="record_id"></p>
</Params>
<AssertEvMask>0x0A80</AssertEvMask>
<DeassertEvMask>0x7A80</DeassertEvMask>
<DiscreteRdMask>0x3838</DiscreteRdMask>
<AnalogDataFmt>2S_COMPL</AnalogDataFmt>
<PosHysteresis>2</PosHysteresis>
<NegHysteresis>2</NegHysteresis>
<MaxReading>127</MaxReading>
<MinReading>-128</MinReading>
</Sensor>
</Sensors>
-->
</SensorList>
</IPMC>