mirror of https://github.com/rusefi/rusefi-1.git
detect too short/too long boost (#4363)
This commit is contained in:
parent
40f48212aa
commit
88b8e57e10
|
@ -23,11 +23,32 @@ inj2_start: dfsct hs1 hs2 ls2; * Set the 3 shortcuts: VBAT,
|
|||
jmpr boost0; * Jump to launch phase
|
||||
|
||||
* ### Launch phase enable boost ###
|
||||
* Row1 - !start: injection ended
|
||||
* Row2 - Overcurrent, jump to error case (threshold is reached early)
|
||||
* Row3 - Overcurrent, jump to peak phase (threshold is reached on time)
|
||||
* Row4 - timer1: Minimum boost time reached - switch to row3 instead of row2 to allow peak phase
|
||||
* Row5 - timer2: Boost phase timeout - boost took too long, go to error phase
|
||||
boost0: load Iboost dac_sssc _ofs; * Load the boost phase current threshold in the current DAC
|
||||
cwer peak0 ocur row2; * Jump to peak phase when current is over threshold
|
||||
cwer boost0_err ocur row2; * On overcurrent, go to boost error case
|
||||
cwer peak0 ocur row3; * Jump to peak phase when current is over threshold
|
||||
|
||||
ldcd rst _ofs keep keep Tboost_min c1; * Start boost counter to switch out of error behavior if threshold reached
|
||||
cwer boost0_mintime tc1 row4; * On timer timeout, go allow overcurrent without error (ie, end of boost)
|
||||
|
||||
ldcd rst _ofs keep keep Tboost_max c2; * Start boost counter in case Iboost never reached
|
||||
cwer boost0_err tc2 row5; * Jump to boost0_err in case boost phase takes too long
|
||||
|
||||
stf low b0; * set flag0 low to force the DC-DC converter in idle mode
|
||||
stos off on on; * Turn VBAT off, BOOST on, LS on
|
||||
wait row12; * Wait for one of the previously defined conditions
|
||||
wait row1245; * Wait for one of the previously defined conditions
|
||||
|
||||
* ### Boost phase - minimum time reached ###
|
||||
boost0_mintime: wait row135; * Minimum time for boost phase has been reached, now wait for !start, overcurrent or timeout
|
||||
|
||||
boost0_err: stos off off off; * Turn off all drivers
|
||||
stf low b10; * Set ch1 error flag (OA_1) to signal MCU
|
||||
stf high b0; * set flag0 high to release the DC-DC converter idle mode
|
||||
wait row1; * Wait for start signal to go low for the next injection attempt
|
||||
|
||||
* ### Peak phase continue on Vbat ###
|
||||
peak0: ldcd rst _ofs keep keep Tpeak_tot c1; * Load the length of the total peak phase in counter 1
|
||||
|
@ -95,11 +116,33 @@ inj4_start: dfsct hs3 hs4 ls4; * Set the 3 shortcuts: VBAT,
|
|||
jmpr boost1; * Jump to launch phase
|
||||
|
||||
* ### Launch phase enable boost ###
|
||||
* Row1 - !start: injection ended
|
||||
* Row2 - Overcurrent, jump to error case (threshold is reached early)
|
||||
* Row3 - Overcurrent, jump to peak phase (threshold is reached on time)
|
||||
* Row4 - timer1: Minimum boost time reached - switch to row3 instead of row2 to allow peak phase
|
||||
* Row5 - timer2: Boost phase timeout - boost took too long, go to error phase
|
||||
boost1: load Iboost dac_sssc _ofs; * Load the boost phase current threshold in the current DAC
|
||||
cwer peak1 ocur row2; * Jump to peak phase when current is over threshold
|
||||
cwer boost1_err ocur row2; * On overcurrent, go to boost error case
|
||||
cwer peak1 ocur row3; * Jump to peak phase when current is over threshold
|
||||
|
||||
ldcd rst _ofs keep keep Tboost_min c1; * Start boost counter to switch out of error behavior if threshold reached
|
||||
cwer boost1_mintime tc1 row4; * On timer timeout, go allow overcurrent without error (ie, end of boost)
|
||||
|
||||
ldcd rst _ofs keep keep Tboost_max c2; * Start boost counter in case Iboost never reached
|
||||
cwer boost1_err tc2 row5; * Jump to boost1_err in case boost phase takes too long
|
||||
|
||||
stf low b0; * set flag0 low to force the DC-DC converter in idle mode
|
||||
stos off on on; * Turn VBAT off, BOOST on, LS on
|
||||
wait row12; * Wait for one of the previously defined conditions
|
||||
wait row1245; * Wait for one of the previously defined conditions
|
||||
|
||||
* ### Boost phase - minimum time reached ###
|
||||
boost1_mintime: wait row135; * Minimum time for boost phase has been reached, now wait for !start, overcurrent or timeout
|
||||
|
||||
boost1_err: stos off off off; * Turn off all drivers
|
||||
stf low b11; * Set ch1 error flag (OA_1) to signal MCU
|
||||
stf high b0; * set flag0 high to release the DC-DC converter idle mode
|
||||
wait row1; * Wait for start signal to go low for the next injection attempt
|
||||
|
||||
|
||||
* ### Peak phase continue on Vbat ###
|
||||
peak1: ldcd rst _ofs keep keep Tpeak_tot c1; * Load the length of the total peak phase in counter 1
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
0000000000000000
|
||||
0000000000000000
|
||||
0000000000000000
|
||||
0000001100000011
|
||||
0000101100010011
|
||||
0000000000000000
|
||||
0000000000000000
|
||||
0000000001011000
|
||||
1000111001100010
|
||||
0111101100100011
|
||||
0000000001101100
|
||||
0110101101011001
|
||||
1100100010100101
|
||||
0000000000000000
|
||||
0000000000101100
|
||||
0000000000000000
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
0000000000000011
|
||||
0001111111111110
|
||||
0001001111111110
|
||||
0000000000000000
|
||||
0001001000000000
|
||||
0001111000000000
|
||||
0000000000000000
|
||||
0000000000000000
|
||||
0000000000000001
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
<RegisterFile areaName="Channel 2 Configuration Registers (C2PR)">Registers\ch2_config_reg.hex</RegisterFile>
|
||||
<RegisterFile areaName="Diagnosis Configuration Registers (DCR)">Registers\diag_config_reg.hex</RegisterFile>
|
||||
<RegisterFile areaName="Crossbar Configuration Registers (XCR)">Registers\io_config_reg.hex</RegisterFile>
|
||||
<MicroCodeFile channel="1" type="source" date="133022949930891999">MicrocodeCh1\ch1.psc</MicroCodeFile>
|
||||
<MicroCodeFile channel="2" type="source" date="133022946985656120">MicrocodeCh2\ch2.psc</MicroCodeFile>
|
||||
<MicroCodeFile channel="1" type="binary" date="133022946934441089">bin\ch1.bin</MicroCodeFile>
|
||||
<MicroCodeFile channel="2" type="binary">bin\ch2.bin</MicroCodeFile>
|
||||
<MicroCodeFile channel="1" type="hex" date="133022946936135350">bin\ch1.hex</MicroCodeFile>
|
||||
<MicroCodeFile channel="2" type="hex">bin\ch2.hex</MicroCodeFile>
|
||||
<MicroCodeFile channel="1" type="source" date="133028365609622710">MicrocodeCh1\ch1.psc</MicroCodeFile>
|
||||
<MicroCodeFile channel="2" type="source" date="133028364882509871">MicrocodeCh2\ch2.psc</MicroCodeFile>
|
||||
<MicroCodeFile channel="1" type="binary" date="133028335142178693">bin\ch1.bin</MicroCodeFile>
|
||||
<MicroCodeFile channel="2" type="binary" date="133028335144648651">bin\ch2.bin</MicroCodeFile>
|
||||
<MicroCodeFile channel="1" type="hex" date="133028335142698602">bin\ch1.hex</MicroCodeFile>
|
||||
<MicroCodeFile channel="2" type="hex" date="133028335145068598">bin\ch2.hex</MicroCodeFile>
|
||||
<DPramFile channel="1">Registers\dram1.hex</DPramFile>
|
||||
<DPramFile channel="2">Registers\dram2.hex</DPramFile>
|
||||
<LabelFile>labels.xml</LabelFile>
|
||||
|
@ -34,9 +34,9 @@
|
|||
<Clock>1 MHz</Clock>
|
||||
</General>
|
||||
<Windows>
|
||||
<Structure x="24" y="152" xSize="392" ySize="482" state="Normal" visible="False" />
|
||||
<Signals x="441" y="38" xSize="250" ySize="1084" state="Normal" visible="False" />
|
||||
<Micro x="0" y="0" xSize="600" ySize="715" state="Normal" visible="True">
|
||||
<Structure x="292" y="767" xSize="392" ySize="482" state="Normal" visible="True" />
|
||||
<Signals x="698" y="177" xSize="250" ySize="1083" state="Normal" visible="True" />
|
||||
<Micro x="0" y="0" xSize="936" ySize="715" state="Normal" visible="True">
|
||||
<Hex8ForLine>True</Hex8ForLine>
|
||||
<SeparateCompiledFolder>True</SeparateCompiledFolder>
|
||||
<DPram channel="1" addressFormat="Hex">
|
||||
|
@ -48,8 +48,8 @@
|
|||
<Entry address="5" format="Source" unit="None" indexSelected="0" />
|
||||
<Entry address="6" format="Source" unit="None" indexSelected="0" />
|
||||
<Entry address="7" format="Source" unit="None" indexSelected="0" />
|
||||
<Entry address="8" format="Hex" unit="None" indexSelected="0" />
|
||||
<Entry address="9" format="Hex" unit="None" indexSelected="0" />
|
||||
<Entry address="8" format="Source" unit="None" indexSelected="0" />
|
||||
<Entry address="9" format="Source" unit="None" indexSelected="0" />
|
||||
<Entry address="10" format="Hex" unit="None" indexSelected="0" />
|
||||
<Entry address="11" format="Hex" unit="None" indexSelected="0" />
|
||||
<Entry address="12" format="Hex" unit="None" indexSelected="0" />
|
||||
|
@ -361,11 +361,11 @@
|
|||
<Reg>Hex</Reg>
|
||||
</RegisterArea>
|
||||
</Micro>
|
||||
<Log x="22" y="22" xSize="836" ySize="307" state="Normal" visible="True" />
|
||||
<Wave x="601" y="0" xSize="1405" ySize="692" state="Normal" visible="True" />
|
||||
<Current x="601" y="696" xSize="1405" ySize="464" state="Normal" visible="True" />
|
||||
<Stimulus x="39" y="43" xSize="540" ySize="368" state="Normal" visible="False" />
|
||||
<Log x="156" y="156" xSize="931" ySize="663" state="Normal" visible="True" />
|
||||
<Wave x="957" y="5" xSize="1567" ySize="805" state="Normal" visible="True" />
|
||||
<Current x="1096" y="828" xSize="1436" ySize="464" state="Normal" visible="True" />
|
||||
<Stimulus x="214" y="183" xSize="540" ySize="368" state="Normal" visible="False" />
|
||||
<Voltage x="0" y="0" xSize="580" ySize="357" state="Normal" visible="False" />
|
||||
<Actuator x="0" y="716" xSize="601" ySize="444" state="Normal" visible="True" />
|
||||
<Actuator x="15" y="733" xSize="601" ySize="444" state="Normal" visible="True" />
|
||||
</Windows>
|
||||
</Project>
|
|
@ -48,17 +48,19 @@
|
|||
#include "PT2001_LoadData.h"
|
||||
|
||||
// Data to be loaded into the Code RAM 1 memory space
|
||||
unsigned short PT2001_code_RAM1[88] =
|
||||
unsigned short PT2001_code_RAM1[108] =
|
||||
{
|
||||
0x7612, 0x6C2B, 0x917F, 0xA514, 0x8DD1, 0xC289, 0x7C38, 0xA73B, 0xF359, 0x56C3,
|
||||
0xEE73, 0x812F, 0xDFA9, 0x2ED5, 0x2722, 0xBC58, 0x649B, 0xFB66, 0xFAD7, 0xBB51,
|
||||
0xBD0C, 0xBEA9, 0x2F34, 0xDA2C, 0x41CF, 0x8DDD, 0xB4F4, 0xCA54, 0xAF19, 0x6707,
|
||||
0xDA8A, 0x1D69, 0x6015, 0xA215, 0xB473, 0xF3AB, 0x6CC1, 0xE620, 0x8D0F, 0x5FC6,
|
||||
0x3DA2, 0x4662, 0x0EF2, 0x63A6, 0xEFAD, 0x9915, 0xA134, 0xBB55, 0xD6E8, 0xBDC9,
|
||||
0x433D, 0x3943, 0x4AEA, 0xCD3C, 0xE90A, 0xC413, 0xD3A3, 0xF690, 0xE423, 0x0106,
|
||||
0x72BC, 0xD39A, 0x0329, 0x3AF3, 0x9F62, 0x9FA6, 0xD615, 0xEF1D, 0xAF32, 0x31BF,
|
||||
0x5A43, 0x2FAD, 0xFD4E, 0xB35B, 0x56F3, 0xFAB7, 0x5ADE, 0x3A4C, 0xCA7D, 0x20AF,
|
||||
0x24CE, 0x808E, 0x43CD, 0xDF83, 0xE8DF, 0x7CC1, 0xE738, 0x1B09
|
||||
0x7612, 0x6C43, 0x917F, 0xA514, 0x8DD1, 0xC289, 0x7C38, 0xA73B, 0xF359, 0x56C3,
|
||||
0xEE73, 0x812F, 0xC3A9, 0xC08B, 0x4371, 0x45BB, 0x64D7, 0xB185, 0x1C57, 0x49AA,
|
||||
0x40E9, 0xBF4C, 0x2F07, 0xDBCD, 0x057C, 0x8C8A, 0xD1F7, 0x3B13, 0x492C, 0x6544,
|
||||
0x277D, 0x799E, 0xD6B1, 0x477E, 0x0091, 0x0103, 0x6DA0, 0xA3AE, 0xE91C, 0xAF72,
|
||||
0x3DAC, 0x2230, 0xB8C0, 0x8A6B, 0x1E34, 0xDEBF, 0x0592, 0x9E7A, 0x8E2D, 0x809B,
|
||||
0x4F9F, 0x85C9, 0x5119, 0x7C72, 0xF333, 0xC575, 0x8B35, 0xD254, 0xD8FA, 0x3D01,
|
||||
0x1B1D, 0xDA87, 0xFE4A, 0x74B1, 0x789D, 0x2B94, 0x360D, 0x00A8, 0x8F78, 0xC909,
|
||||
0x3F0C, 0x9409, 0xFDFB, 0x43E3, 0x56E1, 0x9FA5, 0xEC49, 0xDEC7, 0x3A2C, 0xD350,
|
||||
0x40AC, 0x3447, 0xC1EB, 0x2D74, 0x1526, 0x7C64, 0xE7AE, 0x17AF, 0xDA5A, 0x78DB,
|
||||
0x1F1B, 0x5A34, 0x6503, 0xD511, 0xF26C, 0x9461, 0x7962, 0x531A, 0xB074, 0xF3C1,
|
||||
0xB55C, 0xDAC7, 0x4746, 0x3AE8, 0xDFB2, 0x04D9, 0x05F1, 0x1C88
|
||||
};
|
||||
|
||||
// Data to be loaded into the Code RAM 2 memory space
|
||||
|
@ -92,7 +94,7 @@ unsigned short PT2001_data_RAM[128] =
|
|||
// Data to be loaded into the Main register memory space
|
||||
unsigned short PT2001_main_config[29] =
|
||||
{
|
||||
0x0003, 0x1FFE, 0x0000, 0x1200, 0x0000, 0x0000, 0x0001, 0x0000, 0x001F, 0x0000,
|
||||
0x0003, 0x13FE, 0x0000, 0x1E00, 0x0000, 0x0000, 0x0001, 0x0000, 0x001F, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
|
||||
};
|
||||
|
@ -100,7 +102,7 @@ unsigned short PT2001_main_config[29] =
|
|||
// Data to be loaded into the CH1 register memory space
|
||||
unsigned short PT2001_ch1_config[19] =
|
||||
{
|
||||
0x0008, 0x0000, 0x0000, 0x0000, 0x0303, 0x0000, 0x0000, 0x0058, 0x8E62, 0x7B23,
|
||||
0x0008, 0x0000, 0x0000, 0x0000, 0x0B13, 0x0000, 0x0000, 0x006C, 0x6B59, 0xC8A5,
|
||||
0x0000, 0x002C, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
|
||||
};
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#ifndef PT2001_DATA_H_
|
||||
#define PT2001_DATA_H_
|
||||
|
||||
extern unsigned short PT2001_code_RAM1[88]; // CODE RAM CH 1
|
||||
extern unsigned short PT2001_code_RAM1[108]; // CODE RAM CH 1
|
||||
extern unsigned short PT2001_code_RAM2[43]; // CODE RAM CH 2
|
||||
extern unsigned short PT2001_data_RAM[128]; // DATA RAM
|
||||
extern unsigned short PT2001_main_config[29]; // main configurations
|
||||
|
|
Loading…
Reference in New Issue