This commit is contained in:
rusefi 2023-09-27 13:25:08 -04:00
commit 43b1cb2597
22 changed files with 49 additions and 43 deletions

View File

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,7.0.7-7.0.7~ubuntu22.04.1*
G04 #@! TF.CreationDate,2023-09-05T03:52:23+00:00*
G04 #@! TF.CreationDate,2023-09-27T14:01:54+00:00*
G04 #@! TF.ProjectId,284617-1,32383436-3137-42d3-912e-6b696361645f,R0.4*
G04 #@! TF.SameCoordinates,PX47868c0PY8bfd670*
G04 #@! TF.FileFunction,Copper,L2,Bot*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-05 03:52:23*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-27 14:01:54*
%MOMM*%
%LPD*%
G01*

View File

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,7.0.7-7.0.7~ubuntu22.04.1*
G04 #@! TF.CreationDate,2023-09-05T03:52:23+00:00*
G04 #@! TF.CreationDate,2023-09-27T14:01:54+00:00*
G04 #@! TF.ProjectId,284617-1,32383436-3137-42d3-912e-6b696361645f,R0.4*
G04 #@! TF.SameCoordinates,PX47868c0PY8bfd670*
G04 #@! TF.FileFunction,Soldermask,Bot*
G04 #@! TF.FilePolarity,Negative*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-05 03:52:23*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-27 14:01:54*
%MOMM*%
%LPD*%
G01*

View File

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,7.0.7-7.0.7~ubuntu22.04.1*
G04 #@! TF.CreationDate,2023-09-05T03:52:23+00:00*
G04 #@! TF.CreationDate,2023-09-27T14:01:54+00:00*
G04 #@! TF.ProjectId,284617-1,32383436-3137-42d3-912e-6b696361645f,R0.4*
G04 #@! TF.SameCoordinates,PX47868c0PY8bfd670*
G04 #@! TF.FileFunction,Paste,Bot*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-05 03:52:23*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-27 14:01:54*
%MOMM*%
%LPD*%
G01*

View File

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,7.0.7-7.0.7~ubuntu22.04.1*
G04 #@! TF.CreationDate,2023-09-05T03:52:23+00:00*
G04 #@! TF.CreationDate,2023-09-27T14:01:54+00:00*
G04 #@! TF.ProjectId,284617-1,32383436-3137-42d3-912e-6b696361645f,R0.4*
G04 #@! TF.SameCoordinates,PX47868c0PY8bfd670*
G04 #@! TF.FileFunction,Legend,Bot*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-05 03:52:23*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-27 14:01:54*
%MOMM*%
%LPD*%
G01*

View File

@ -1,11 +1,11 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,7.0.7-7.0.7~ubuntu22.04.1*
G04 #@! TF.CreationDate,2023-09-05T03:52:23+00:00*
G04 #@! TF.CreationDate,2023-09-27T14:01:54+00:00*
G04 #@! TF.ProjectId,284617-1,32383436-3137-42d3-912e-6b696361645f,R0.4*
G04 #@! TF.SameCoordinates,PX47868c0PY8bfd670*
G04 #@! TF.FileFunction,Profile,NP*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-05 03:52:23*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-27 14:01:54*
%MOMM*%
%LPD*%
G01*

View File

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,7.0.7-7.0.7~ubuntu22.04.1*
G04 #@! TF.CreationDate,2023-09-05T03:52:23+00:00*
G04 #@! TF.CreationDate,2023-09-27T14:01:54+00:00*
G04 #@! TF.ProjectId,284617-1,32383436-3137-42d3-912e-6b696361645f,R0.4*
G04 #@! TF.SameCoordinates,PX47868c0PY8bfd670*
G04 #@! TF.FileFunction,Copper,L1,Top*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-05 03:52:23*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-27 14:01:54*
%MOMM*%
%LPD*%
G01*

View File

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,7.0.7-7.0.7~ubuntu22.04.1*
G04 #@! TF.CreationDate,2023-09-05T03:52:23+00:00*
G04 #@! TF.CreationDate,2023-09-27T14:01:54+00:00*
G04 #@! TF.ProjectId,284617-1,32383436-3137-42d3-912e-6b696361645f,R0.4*
G04 #@! TF.SameCoordinates,PX47868c0PY8bfd670*
G04 #@! TF.FileFunction,Soldermask,Top*
G04 #@! TF.FilePolarity,Negative*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-05 03:52:23*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-27 14:01:54*
%MOMM*%
%LPD*%
G01*

View File

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,7.0.7-7.0.7~ubuntu22.04.1*
G04 #@! TF.CreationDate,2023-09-05T03:52:23+00:00*
G04 #@! TF.CreationDate,2023-09-27T14:01:54+00:00*
G04 #@! TF.ProjectId,284617-1,32383436-3137-42d3-912e-6b696361645f,R0.4*
G04 #@! TF.SameCoordinates,PX47868c0PY8bfd670*
G04 #@! TF.FileFunction,Paste,Top*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-05 03:52:23*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-27 14:01:54*
%MOMM*%
%LPD*%
G01*

View File

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,7.0.7-7.0.7~ubuntu22.04.1*
G04 #@! TF.CreationDate,2023-09-05T03:52:23+00:00*
G04 #@! TF.CreationDate,2023-09-27T14:01:54+00:00*
G04 #@! TF.ProjectId,284617-1,32383436-3137-42d3-912e-6b696361645f,R0.4*
G04 #@! TF.SameCoordinates,PX47868c0PY8bfd670*
G04 #@! TF.FileFunction,Legend,Top*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-05 03:52:23*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-27 14:01:54*
%MOMM*%
%LPD*%
G01*

View File

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,7.0.7-7.0.7~ubuntu22.04.1*
G04 #@! TF.CreationDate,2023-09-05T03:52:23+00:00*
G04 #@! TF.CreationDate,2023-09-27T14:01:54+00:00*
G04 #@! TF.ProjectId,284617-1,32383436-3137-42d3-912e-6b696361645f,R0.4*
G04 #@! TF.SameCoordinates,PX47868c0PY8bfd670*
G04 #@! TF.FileFunction,Copper,L2,Inr*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-05 03:52:23*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-27 14:01:54*
%MOMM*%
%LPD*%
G01*

View File

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,7.0.7-7.0.7~ubuntu22.04.1*
G04 #@! TF.CreationDate,2023-09-05T03:52:23+00:00*
G04 #@! TF.CreationDate,2023-09-27T14:01:54+00:00*
G04 #@! TF.ProjectId,284617-1,32383436-3137-42d3-912e-6b696361645f,R0.4*
G04 #@! TF.SameCoordinates,PX47868c0PY8bfd670*
G04 #@! TF.FileFunction,Copper,L3,Inr*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-05 03:52:23*
G04 Created by KiCad (PCBNEW 7.0.7-7.0.7~ubuntu22.04.1) date 2023-09-27 14:01:54*
%MOMM*%
%LPD*%
G01*

View File

@ -5,7 +5,7 @@
"Application": "Pcbnew",
"Version": "7.0.7-7.0.7~ubuntu22.04.1"
},
"CreationDate": "2023-09-05T03:52:23+00:00"
"CreationDate": "2023-09-27T14:01:54+00:00"
},
"GeneralSpecs": {
"ProjectId": {

View File

@ -1,7 +1,7 @@
M48
; DRILL file {KiCad 7.0.7-7.0.7~ubuntu22.04.1} date Tue Sep 5 03:52:23 2023
; DRILL file {KiCad 7.0.7-7.0.7~ubuntu22.04.1} date Wed Sep 27 14:01:55 2023
; FORMAT={2:4/ absolute / inch / suppress leading zeros}
; #@! TF.CreationDate,2023-09-05T03:52:23+00:00
; #@! TF.CreationDate,2023-09-27T14:01:55+00:00
; #@! TF.GenerationSoftware,Kicad,Pcbnew,7.0.7-7.0.7~ubuntu22.04.1
; #@! TF.FileFunction,MixedPlating,1,2
FMAT,2

View File

@ -2,7 +2,7 @@
<export version="E">
<design>
<source>/home/runner/work/rusefi-hardware/rusefi-hardware/breakout-boards/Breakout_154pin_284617-1-Connector/284617-1.kicad_sch</source>
<date>Tue Sep 5 03:52:20 2023</date>
<date>Wed Sep 27 14:01:52 2023</date>
<tool>Eeschema 7.0.7-7.0.7~ubuntu22.04.1</tool>
<sheet number="1" name="/" tstamps="/">
<title_block>

Binary file not shown.

View File

@ -44,6 +44,7 @@ void startNewCanTest() {
isGoodCanPackets = true;
hasReceivedAnalog = false;
hasReceivedBoardId = false;
currentBoard = nullptr;
// reset
counterStatus = CounterStatus();
}
@ -52,9 +53,13 @@ bool isHappyCanTest() {
return isGoodCanPackets && hasReceivedAnalog;
}
bool checkCounterStatus() {
if (currentBoard == nullptr)
bool checkDigitalInputCounterStatus() {
if (currentBoard == nullptr) {
setRedText();
chprintf(chp, "* UNKNOWN BOARD ID while trying to check digital input event counter!\r\n");
setNormalText();
return false;
}
bool isHappy = true;
@ -95,13 +100,13 @@ static bool wasBoardDetectError = false;
int numSecondsSinceReset;
static void receiveBoardStatus(const uint8_t msg[8]) {
numSecondsSinceReset = (msg[2] << 16) | (msg[3] << 8) | msg[4];
if (hasReceivedBoardId) {
return;
}
hasReceivedBoardId = true;
int boardId = (msg[0] << 8) | msg[1];
numSecondsSinceReset = (msg[2] << 16) | (msg[3] << 8) | msg[4];
int engineType = (msg[5] << 8) | msg[6];
if (outputMode.displayCanReceive) {

View File

@ -17,7 +17,7 @@
void initCan();
void startNewCanTest();
bool isHappyCanTest();
bool checkCounterStatus();
bool checkDigitalInputCounterStatus();
int getDigitalOutputStepsCount();
int getLowSideOutputCount();
void setOutputCountRequest();

View File

@ -96,8 +96,8 @@ if (listenMode) {
bool isGoodDigitalOutputs = testEcuDigitalOutputs(currentIndex);
currentIndex += getDigitalOutputStepsCount();
bool isGoodDigitalInputs = testEcuDigitalInputs(currentIndex);
bool isHappyCounterStatus = checkCounterStatus();
stimulateEcuDigitalInputs(currentIndex);
bool isHappyDigitalInputCounterStatus = checkDigitalInputCounterStatus();
bool isHappyUptime = numSecondsSinceReset > 30;
if (!isHappyUptime) {
setRedText();
@ -105,10 +105,9 @@ if (listenMode) {
setNormalText();
}
bool isAllGood = isGoodDigitalOutputs
&& isGoodDigitalInputs
&& isHappyCanTest()
&& isHappyUptime
&& isHappyCounterStatus;
&& isHappyDigitalInputCounterStatus;
executionCounter++;

View File

@ -4,6 +4,7 @@
#include "terminal_util.h"
#include "test_logic.h"
// todo: reuse pin_repository in this project
static io_pin stimOutputPins[] = {
{ GPIOE, 0 }, // DIG_0
{ GPIOE, 7 },
@ -29,16 +30,15 @@ size_t getDigitalInputStepsCount() {
return efi::size(stimOutputPins);
}
bool testEcuDigitalInputs(size_t startStepIndex) {
void stimulateEcuDigitalInputs(size_t startStepIndex) {
for (size_t idx = 0; idx < getDigitalInputStepsCount(); idx++) {
io_pin *pin = &stimOutputPins[idx];
setGlobalStatusText();
chprintf(chp, "%d/%d",
startStepIndex + idx,
totalStepsNumber());
chprintf(chp, "%d/%d", startStepIndex + idx, totalStepsNumber());
setNormalText();
chprintf(chp, " Toggling port %d\r\n",
pin->pin);
chprintf(chp, " Toggling port %d\r\n", pin->pin);
bool bitState = true;
for (int toggle_i = 0; toggle_i < 10; toggle_i++) {
palWritePad(pin->port, pin->pin, bitState ? 1 : 0);
@ -48,5 +48,4 @@ bool testEcuDigitalInputs(size_t startStepIndex) {
// turn the pin off for safety reasons
palWritePad(pin->port, pin->pin, 0);
}
return true;
}

View File

@ -3,4 +3,4 @@
#include "global.h"
void initStimDigitalOutputs();
bool testEcuDigitalInputs(size_t startStepIndex);
void stimulateEcuDigitalInputs(size_t startStepIndex);

View File

@ -73,7 +73,10 @@ Baudrate is 115200
# Firmware Upload
DODO
Two ways to program using STM32CubeProgrammer
* recommended way: using UART connectivity. Power device up while shorting BOOT jumper to enter DFU mode.
* st-link if you have tc2030 spring-loaded cable.
# Changelog