[help needed] Can not set trigger pins after compiling custom firmware.

It's all about the code!
Post Reply
opelpanfan
Posts: 25
Joined: Thu Oct 07, 2021 1:38 pm
Github Username: opelpanfan
Slack: Ben

Can not set trigger pins after compiling custom firmware.

Post by opelpanfan »

Compiled custom FW based on hellen72 config but can set trigger pins PE2-PE5 and others (except to PA7).

FW compiled with no issues with options
DDEFS += -DHAL_TRIGGER_USE_PAL=TRUE
DDEFS += -DHAL_VSS_USE_PAL=TRUE

As soon as I set pin to PE2 Critical alert LED lights up and get Error message in TS "Invalid Trigger #1 input pin: PE2"
image.png
image.png (129.56 KiB) Viewed 3915 times
User avatar
AndreyB
Site Admin
Posts: 14332
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Can not set trigger pins after compiling custom firmware.

Post by AndreyB »

Let's take a step back - why do you need a custom FW based on Hellen72? What hardware is this for, what's the bigger picture?

Looks like PE2 is not a valid ICU pin, please look around the following code

Code: Select all

digital_input_s* startDigitalCapture(const char *msg, brain_pin_e brainPin) {
	ICUDriver *driver = getInputCaptureDriver(msg, brainPin);
	if (!driver) {
		firmwareError(CUSTOM_ERR_INVALID_INPUT_ICU_PIN, "Invalid %s input pin: %s", msg, hwPortname(brainPin));
		return nullptr;
	}
the whole ICU vs PAL switch is a nightmare and something I am ashamed of. Major technical debt in this area.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
opelpanfan
Posts: 25
Joined: Thu Oct 07, 2021 1:38 pm
Github Username: opelpanfan
Slack: Ben

Re: Can not set trigger pins after compiling custom firmware.

Post by opelpanfan »

Ok, Step back:
I only used Hellen board build files as an example to get my head around how to build custom FW.
The hardware I use is my custom STM32f407ZG board. Board has 24 LOW sides through VNLD5090, then 12 HIGH sides through TC4424, 2 Canbus, 2 14point7 lambda, 12 analog inputs, 8 digital inputs, 4 vr through max9926, 4 status LED, 2 sensor 5v supply, LPS25/22 I2C bar, RTC and SD card through SDIO.

Bigger picture I want to run this board on my c20LET (Opel Calibra Turbo) engine and multiple other cars.
Recompiled with ICU disabled and now works.
User avatar
AndreyB
Site Admin
Posts: 14332
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Can not set trigger pins after compiling custom firmware.

Post by AndreyB »

opelpanfan wrote:
Thu Oct 07, 2021 2:56 pm
The hardware I use is my custom STM32f407ZG board.
https://rusefi.com/forum/viewtopic.php?p=42498#p42498
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
opelpanfan
Posts: 25
Joined: Thu Oct 07, 2021 1:38 pm
Github Username: opelpanfan
Slack: Ben

Re: Can not set trigger pins after compiling custom firmware.

Post by opelpanfan »

Ok. I'll keep in mind when going to assemble second board. Have 437zg and 469zi MCU. But for now will it still work on 407?
User avatar
AndreyB
Site Admin
Posts: 14332
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Can not set trigger pins after compiling custom firmware.

Post by AndreyB »

Yes.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Post Reply