GDI4: master does not click 4 injectors #203

here I revert to microcode version prior to https://github.com/rusefi/rusefi-hardware/pull/139 change

manual testing results: HV changes according to CAN calibration change settings and four injectors click
This commit is contained in:
rusefi 2023-05-15 23:12:01 -04:00
parent 42d939bfe4
commit 4cae8c7e54
4 changed files with 194 additions and 2 deletions

View File

@ -130,7 +130,9 @@ LDSCRIPT= gdi.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(ALLCSRC) \
$(RUSEFI_LIB_C) \
mc33816_data.c
# https://github.com/rusefi/rusefi-hardware/issues/203 states that https://github.com/rusefi/libfirmware/tree/master/pt2001 version of the microcode clicks only two not four injectors
# $(RUSEFI_LIB_C) \
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
@ -151,7 +153,8 @@ ASMXSRC = $(ALLXASMSRC)
# Inclusion directories.
INCDIR = $(CONFDIR) $(ALLINC) \
$(RUSEFI_LIB_INC) \
$(RUSEFI_LIB)/util/include \
$(RUSEFI_LIB)/pt2001/include \
$(RUSEFI_LIB)/can

View File

@ -0,0 +1,20 @@
/*
* mc33816_data.h
*
* @date May 3, 2019
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#pragma once
extern unsigned short PT2001_code_RAM1[88]; // 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
extern unsigned short PT2001_ch1_config[19]; // CH 1 configurations
extern unsigned short PT2001_ch2_config[19]; // CH 2 configurations
extern unsigned short PT2001_io_config[44]; // IO configurations
extern unsigned short PT2001_diag_config[44]; // diag configurations

View File

@ -0,0 +1,72 @@
/*******************************************************************************
* Example Code
*
* Copyright(C) 2022 NXP Semiconductors
* NXP Semiconductors Confidential and Proprietary
*
* Software that is described herein is for illustrative purposes only
* which provides customers with programming information regarding the
* NXP products. This software is supplied "AS IS" without any warranties
* of any kind, and NXP Semiconductors and its licensor disclaim any and
* all warranties, express or implied, including all implied warranties of
* merchantability, fitness for a particular purpose and non-infringement of
* intellectual property rights. NXP Semiconductors assumes no responsibility
* or liability for the use of the software, conveys no license or rights
* under any patent, copyright, mask work right, or any other intellectual
* property rights in or to any products. NXP Semiconductors reserves the
* right to make changes in the software without notification. NXP
* Semiconductors also makes no representation or warranty that such
* application will be suitable for the specified use without further testing
* or modification.
*
* IN NO EVENT WILL NXP SEMICONDUCTORS BE LIABLE, WHETHER IN CONTRACT,
* TORT, OR OTHERWISE, FOR ANY INCIDENTAL, SPECIAL, INDIRECT, CONSEQUENTIAL
* OR PUNITIVE DAMAGES, INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR ANY
* LOSS OF USE, LOSS OF TIME, INCONVENIENCE, COMMERCIAL LOSS, OR LOST
* PROFITS, SAVINGS, OR REVENUES, TO THE FULL EXTENT SUCH MAY BE DISCLAIMED
* BY LAW. NXP SEMICONDUCTORS TOTAL LIABILITY FOR ALL COSTS, DAMAGES,
* CLAIMS, OR LOSSES WHATSOEVER ARISING OUT OF OR IN CONNECTION WITH THE
* SOFTWARE IS LIMITED TO THE AGGREGATE AMOUNT PAID BY YOU TO NXP SEMICONDUCTORS
* IN CONNECTION WITH THE SOFTWARE TO WHICH LOSSES OR DAMAGES ARE CLAIMED.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation is hereby granted, under NXP Semiconductors' and its
* licensor's relevant copyrights in the software, without fee, provided
* that it is used in conjunction with NXP Semiconductors devices. This
* copyright, permission, and disclaimer notice must appear in all copies
* of this code.
*******************************************************************************/
/*
* PT2001_dram.h
*
* DRAM Header File
*
*/
#ifndef PT2001_DRAM_H_
#define PT2001_DRAM_H_
// DRAM 1 Parameter Addresses
#define PT2001_D1_Iboost 0x00
#define PT2001_D1_Ipeak 0x01
#define PT2001_D1_Ihold 0x02
#define PT2001_D1_Tpeak_off 0x03
#define PT2001_D1_Tpeak_tot 0x04
#define PT2001_D1_Tbypass 0x05
#define PT2001_D1_Thold_off 0x06
#define PT2001_D1_Thold_tot 0x07
#define PT2001_D1_Tboost_max 0x08
#define PT2001_D1_Tboost_min 0x09
// DRAM 2 Parameter Addresses
#define PT2001_D2_Vboost_high 0x40
#define PT2001_D2_Vboost_low 0x41
#define PT2001_D2_Isense4_high 0x42
#define PT2001_D2_Isense4_low 0x43
#define PT2001_D2_PCV_Ipeak 0x45
#define PT2001_D2_PCV_Ihold 0x46
#define PT2001_D2_PCV_Thold_off 0x47
#define PT2001_D2_PCV_Thold_tot 0x48
#endif /* PT2001_DRAM_H_ */

View File

@ -0,0 +1,97 @@
/*
* mc33816_data.c
*
* For historic reasons rusEFI source code refers to all this as mc33816 while the microcode
* is signed with MC33PT2001 key. to use real mc33816 you would have to replace binary data with true mc33816 version
*
* this is manual copy-paste of sample_code/PT2001_LoadData.c
* see mc33816/rusefi/readme.md
*/
// Data to be loaded into the Code RAM 1 memory space
unsigned short PT2001_code_RAM1[88] =
{
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
};
// Data to be loaded into the Code RAM 2 memory space
unsigned short PT2001_code_RAM2[43] =
{
0x761B, 0x6F45, 0x838D, 0x80B4, 0x53F2, 0x0EBC, 0x8F2D, 0xA78E, 0xE8AB, 0xE3DB,
0xF477, 0x800F, 0x2336, 0x2F77, 0x267B, 0xBC19, 0x007E, 0x4E55, 0x28AA, 0x52E4,
0x40CF, 0x0AFD, 0x8B32, 0xFF03, 0x3D8E, 0x802E, 0x1340, 0x95D0, 0x1E86, 0x6591,
0xDBEB, 0x786D, 0xB2DF, 0xF4BF, 0xBEB2, 0xF1F4, 0x9E53, 0xE743, 0xE842, 0x3DD7,
0x3DA2, 0x4663, 0x03AF
};
// Data to be loaded into the Data RAM memory space
unsigned short PT2001_data_RAM[128] =
{
0x00F0, 0x00F0, 0x008C, 0x2000, 0x01F4, 0x00B4, 0x003C, 0xEA60, 0x0000, 0x003D,
0x6000, 0x003C, 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, 0x002F, 0x001D, 0x0000, 0x0046,
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,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};
// 0x1CE
// if set to '1' Driver_status register is reset on read.
#define Rsetbr 1
// 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,
0x0000, 0x0000, 0x0000, 0x0000, Rsetbr, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};
// 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,
0x0000, 0x002C, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};
// Data to be loaded into the CH2 register memory space
unsigned short PT2001_ch2_config[19] =
{
0x0008, 0x0000, 0x0000, 0x0000, 0x0C00, 0x0000, 0x0000, 0x002B, 0x218C, 0xDCB6,
0x0000, 0x0014, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};
// Data to be loaded into the IO register memory space
unsigned short PT2001_io_config[44] =
{
0x0000, 0x0000, 0x0000, 0x0000, 0x0063, 0x018C, 0x0800, 0x0410, 0x0041, 0x0098,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0041, 0x0041, 0x0041, 0x0000, 0x0004, 0x1000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7F7F, 0x7F7F,
0x007F, 0x0000, 0x0000, 0x0000
};
// Data to be loaded into the Diag register memory space
unsigned short PT2001_diag_config[44] =
{
0x0000, 0x0000, 0x001E, 0x0000, 0x0000, 0x001E, 0x0000, 0x0000, 0x001E, 0x0000,
0x0000, 0x001E, 0x0000, 0x0000, 0x001E, 0x0000, 0x0000, 0x001E, 0x001E, 0x0000,
0x0000, 0x001E, 0x0000, 0x0000, 0x001E, 0x0000, 0x0000, 0x001E, 0x0000, 0x0000,
0x001E, 0x0000, 0x0000, 0x001E, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0001
};