lower DAC gain from 12.6 to 8.7, enabling upwards of 25 Amps
This commit is contained in:
parent
7bcee1b813
commit
da1c73e2e7
|
@ -5,7 +5,7 @@
|
||||||
* Note: The Thold_tot variable defines the current profile time out. The active STARTx pin is expected to toggle in is low state before this time out.
|
* Note: The Thold_tot variable defines the current profile time out. The active STARTx pin is expected to toggle in is low state before this time out.
|
||||||
|
|
||||||
* ### Initialization phase ###
|
* ### Initialization phase ###
|
||||||
init0: stgn gain12.6 sssc; * Set the gain of the opamp of the current measure block 1
|
init0: stgn gain8.68 sssc; * Set the gain of the opamp of the current measure block 1
|
||||||
ldjr1 eoinj0; * Load the eoinj line label Code RAM address into the register jr1
|
ldjr1 eoinj0; * Load the eoinj line label Code RAM address into the register jr1
|
||||||
ldjr2 idle0; * Load the idle line label Code RAM address into the register jr2
|
ldjr2 idle0; * Load the idle line label Code RAM address into the register jr2
|
||||||
cwef jr1 _start row1; * If the start signal goes low, go to eoinj phase
|
cwef jr1 _start row1; * If the start signal goes low, go to eoinj phase
|
||||||
|
@ -101,7 +101,7 @@ eoinj0: stos off off off; * Turn VBAT off, BOOST off,
|
||||||
* ### Channel 1 - uCore1 controls the injectors 3 and 4 ###
|
* ### Channel 1 - uCore1 controls the injectors 3 and 4 ###
|
||||||
|
|
||||||
* ### Initialization phase ###
|
* ### Initialization phase ###
|
||||||
init1: stgn gain12.6 sssc; * Set the gain of the opamp of the current measure block 1
|
init1: stgn gain8.68 sssc; * Set the gain of the opamp of the current measure block 1
|
||||||
ldjr1 eoinj1; * Load the eoinj line label Code RAM address into the register jr1
|
ldjr1 eoinj1; * Load the eoinj line label Code RAM address into the register jr1
|
||||||
ldjr2 idle1; * Load the idle line label Code RAM address into the register jr2
|
ldjr2 idle1; * Load the idle line label Code RAM address into the register jr2
|
||||||
cwef jr1 _start row1; * If the start signal goes low, go to eoinj phase
|
cwef jr1 _start row1; * If the start signal goes low, go to eoinj phase
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
0000000000000000
|
0000000000000000
|
||||||
0000000000000000
|
0000000000000000
|
||||||
0000000001110010
|
0000000001110010
|
||||||
1001000111100111
|
1101010000011101
|
||||||
0101011011010110
|
0100111010100110
|
||||||
0000000000000000
|
0000000000000000
|
||||||
0000000000111001
|
0000000000111001
|
||||||
0000000000000000
|
0000000000000000
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
0000000011000000
|
0000000010001101
|
||||||
0000000010010010
|
0000000001101101
|
||||||
0000000001001001
|
0000000000111010
|
||||||
0000000000111100
|
0000000000111100
|
||||||
0001000001101000
|
0001000001101000
|
||||||
0000000000111100
|
0000000000111100
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Example Code
|
* Example Code
|
||||||
*
|
*
|
||||||
* Copyright(C) 2023 NXP Semiconductors
|
* Copyright(C) 2024 NXP Semiconductors
|
||||||
* NXP Semiconductors Confidential and Proprietary
|
* NXP Semiconductors Confidential and Proprietary
|
||||||
*
|
*
|
||||||
* Software that is described herein is for illustrative purposes only
|
* Software that is described herein is for illustrative purposes only
|
||||||
|
@ -50,12 +50,12 @@
|
||||||
// Data to be loaded into the Code RAM 1 memory space
|
// Data to be loaded into the Code RAM 1 memory space
|
||||||
unsigned short PT2001_code_RAM1[114] =
|
unsigned short PT2001_code_RAM1[114] =
|
||||||
{
|
{
|
||||||
0x7612, 0x6C57, 0x917F, 0xA514, 0x8DD6, 0xC288, 0x4F9B, 0x1EC9, 0x5C0D, 0xF99D,
|
0x761E, 0x6C57, 0x917F, 0xA514, 0x8DD6, 0xC288, 0x4F9B, 0x1EC9, 0x5C0D, 0xF99D,
|
||||||
0x4129, 0x2EEE, 0x97B0, 0x3534, 0x93BA, 0x5D25, 0xEE21, 0x2AAD, 0xE457, 0x2DB8,
|
0x4129, 0x2EEE, 0x97B0, 0x3534, 0x93BA, 0x5D25, 0xEE21, 0x2AAD, 0xE457, 0x2DB8,
|
||||||
0xBED3, 0xBEB9, 0x2F08, 0xDA3C, 0x0499, 0x8DDE, 0xB519, 0x8E21, 0xAE4D, 0xF3E1,
|
0xBED3, 0xBEB9, 0x2F08, 0xDA3C, 0x0499, 0x8DDE, 0xB519, 0x8E21, 0xAE4D, 0xF3E1,
|
||||||
0x6E41, 0x9F0E, 0x2476, 0xBA8B, 0x4422, 0x0133, 0x6DAC, 0xA368, 0xE91F, 0x5E97,
|
0x6E41, 0x9F0E, 0x2476, 0xBA8B, 0x4422, 0x0133, 0x6DAC, 0xA368, 0xE91F, 0x5E97,
|
||||||
0x7820, 0x4662, 0xFEE0, 0x6F02, 0x8A92, 0x9A83, 0xE194, 0x6FD0, 0x1895, 0x80AB,
|
0x7820, 0x4662, 0xFEE0, 0x6F02, 0x8A92, 0x9A83, 0xE194, 0x6FD0, 0x1895, 0x80AB,
|
||||||
0x4F93, 0xE1DA, 0x51BF, 0x70D8, 0xF25E, 0x7021, 0x2270, 0xF748, 0x51C5, 0xA4F1,
|
0x4F93, 0xE1DA, 0x51BF, 0x70D8, 0xF25E, 0x7021, 0x2270, 0xF744, 0x51C5, 0xA4F1,
|
||||||
0x329C, 0x5ADC, 0xD84C, 0xF054, 0x6E39, 0x2389, 0xCD76, 0x52F5, 0xF072, 0x8D02,
|
0x329C, 0x5ADC, 0xD84C, 0xF054, 0x6E39, 0x2389, 0xCD76, 0x52F5, 0xF072, 0x8D02,
|
||||||
0x4045, 0xDFEA, 0x1D65, 0xAD07, 0x33F3, 0x6650, 0x8854, 0x210D, 0x3A3C, 0xD20B,
|
0x4045, 0xDFEA, 0x1D65, 0xAD07, 0x33F3, 0x6650, 0x8854, 0x210D, 0x3A3C, 0xD20B,
|
||||||
0x25B3, 0x8090, 0x27DE, 0xDF3E, 0xE928, 0x7D95, 0x83CC, 0xA366, 0x7879, 0x8A2C,
|
0x25B3, 0x8090, 0x27DE, 0xDF3E, 0xE928, 0x7D95, 0x83CC, 0xA366, 0x7879, 0x8A2C,
|
||||||
|
@ -77,13 +77,13 @@ unsigned short PT2001_code_RAM2[43] =
|
||||||
// Data to be loaded into the Data RAM memory space
|
// Data to be loaded into the Data RAM memory space
|
||||||
unsigned short PT2001_data_RAM[128] =
|
unsigned short PT2001_data_RAM[128] =
|
||||||
{
|
{
|
||||||
0x00C0, 0x0092, 0x0049, 0x003C, 0x1068, 0x003C, 0x0168, 0xEA60, 0x0960, 0x0258,
|
0x008D, 0x006D, 0x003A, 0x003C, 0x1068, 0x003C, 0x0168, 0xEA60, 0x0960, 0x0258,
|
||||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
0x0000, 0x0000, 0x0000, 0x0000, 0x00C1, 0x00BF, 0x0040, 0x001D, 0x0000, 0x0046,
|
0x0000, 0x0000, 0x0000, 0x0000, 0x00C1, 0x00BF, 0x0040, 0x001D, 0x0000, 0x0046,
|
||||||
0x0037, 0x003C, 0xEA60, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
0x0037, 0x003C, 0xEA60, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
@ -103,7 +103,7 @@ unsigned short PT2001_main_config[29] =
|
||||||
// Data to be loaded into the CH1 register memory space
|
// Data to be loaded into the CH1 register memory space
|
||||||
unsigned short PT2001_ch1_config[19] =
|
unsigned short PT2001_ch1_config[19] =
|
||||||
{
|
{
|
||||||
0x0008, 0x0000, 0x0000, 0x0000, 0x0303, 0x0000, 0x0000, 0x0072, 0x91E7, 0x56D6,
|
0x0008, 0x0000, 0x0000, 0x0000, 0x0303, 0x0000, 0x0000, 0x0072, 0xD41D, 0x4EA6,
|
||||||
0x0000, 0x0039, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
|
0x0000, 0x0039, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -102,10 +102,10 @@ static uint16_t dacEquation(float current) {
|
||||||
DAC_VALUE = ((I*G_DA_DIFF * R_SENSEx) + V_DA_BIAS) / V_DAC_LSB
|
DAC_VALUE = ((I*G_DA_DIFF * R_SENSEx) + V_DA_BIAS) / V_DAC_LSB
|
||||||
V_DAC_LSB is the DAC resolution = 9.77mv
|
V_DAC_LSB is the DAC resolution = 9.77mv
|
||||||
V_DA_BIAS = 250mV
|
V_DA_BIAS = 250mV
|
||||||
G_DA_DIFF = Gain: 5.79, 8.68, [12.53], 19.25
|
G_DA_DIFF = Gain: 5.79, [8.68], 12.53, 19.25
|
||||||
R_SENSE = 10mOhm soldered on board
|
R_SENSE = 10mOhm soldered on board
|
||||||
*/
|
*/
|
||||||
return ((current * 12.53f * 10) + 250.0f) / 9.77f;
|
return ((current * 8.68f * 10) + 250.0f) / 9.77f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pt2001Base::setTimings() {
|
void Pt2001Base::setTimings() {
|
||||||
|
|
Loading…
Reference in New Issue