[solved] microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

It's all about the code!
Post Reply
chaoschris
Posts: 11
Joined: Mon Dec 18, 2017 4:07 pm

[solved] microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by chaoschris »

Hi folks,
has anybody also encountered this strange behaviour?
My microRusEFI 0.4.7 is running fine with every firmware until 11.10.2020 alias Sausage Pizza Day.

Flashing the following November Firmware BlackFriday from 27.11.2020 shows up following error in Tuner Studio when going online:
rusEFIv20201127.png
rusEFIv20201127.png (138.42 KiB) Viewed 1726 times
It only appears when i am going online with TS. The red "FATAL"-LED is also switched on from this moment.
The problem exists with every newer software since then. If i go back to any older firmware the problem disappears.

What am i doing wrong?

Best regards,
Chris
Last edited by chaoschris on Sat Jan 30, 2021 10:45 am, edited 1 time in total.
User avatar
AndreyB
Site Admin
Posts: 11403
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by AndreyB »

Please provide a URL of your tune on rusEFI Online see https://github.com/rusefi/rusefi/wiki/HOWTO-upload-tune

Please consider "popular vehicles->reset to defaults"

Never saw that error.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239
chaoschris
Posts: 11
Joined: Mon Dec 18, 2017 4:07 pm

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by chaoschris »

It appears on a fresh install. I am doing a full chip erase with stm32 cube programmer, then i am flashing the new firmware. MRE seems to bee running fine (with FATAL-LED off). Then i'm creating a new project in TS and using the right ini-file for the firmware. Immediately after going online with TS the FATAL-LED is on and the error appears in TunerStudio. I can reproduce this behaviour in every firmware release since 27.11.2020.
Going back to any older releases the problem disappears. I have tested this with minimum 10 different firmware releases.
User avatar
AndreyB
Site Admin
Posts: 11403
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by AndreyB »

Weird, I will try your steps on my microRusEFI in a bit
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239
mck1117
running engine in first post
running engine in first post
Posts: 875
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by mck1117 »

What does the "CPU temperature" gauge show?
mck1117
running engine in first post
running engine in first post
Posts: 875
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by mck1117 »

relevant check for reference:

Code: Select all

	if (TemperatureValue > 150.0f || TemperatureValue < -50.0f) {
		firmwareError(OBD_PCM_Processor_Fault, "Invalid CPU temperature measured %f", TemperatureValue);
	}
Gepro
Posts: 100
Joined: Sun Nov 01, 2020 2:15 pm
Location: France

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by Gepro »

Have you the last TunerStudio ? and not beta ? (just "check for update" in the help menu)

I had some weird errors before the last update of tunerstudio.
mck1117
running engine in first post
running engine in first post
Posts: 875
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by mck1117 »

Gepro wrote:
Thu Jan 28, 2021 6:59 pm
Have you the last TunerStudio ? and not beta ? (just "check for update" in the help menu)

I had some weird errors before the last update of tunerstudio.
This error comes directly from the ECU, TunerStudio won't cause it.
Gepro
Posts: 100
Joined: Sun Nov 01, 2020 2:15 pm
Location: France

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by Gepro »

I don't know, if there is no red LED before connecting to tunerstudio, doesn't it mean that there is no error before tunerstudio ?!
mck1117
running engine in first post
running engine in first post
Posts: 875
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by mck1117 »

Gepro wrote:
Thu Jan 28, 2021 7:16 pm
I don't know, if there is no red LED before connecting to tunerstudio, doesn't it mean that there is no error before tunerstudio ?!
tunerstudio is the only thing that reads the CPU temperature, and the check happens whenever CPU temp is read
chaoschris
Posts: 11
Joined: Mon Dec 18, 2017 4:07 pm

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by chaoschris »

Okay, with the newer firmware releases the ECU is really in outer space :lol:
rusEFI_ECUTemp.png
rusEFI_ECUTemp.png (65.34 KiB) Viewed 1699 times
Didn't expect that: going back to firmware from August 2020 shows the same error:
rusEFI_ECUTemp_FW202008.png
rusEFI_ECUTemp_FW202008.png (57.95 KiB) Viewed 1699 times
Same error, but Tunerstudio isn't moaning.
So the error has been there from the beginning of this MRE, but the older firmwares didn't check for this inexplicable value.
Interestingly the value reacts on temperature. putting a warm finger on the stm32 and the value starts to move a bit.
I have found a quick and dirty workaround for me: working in designer mode allows you to get rid of this message... :mrgreen:
But this is no solution, so one day i need to change the stm32 on it.
mck1117
running engine in first post
running engine in first post
Posts: 875
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by mck1117 »

Hmm, that's odd. Which exact STM32 is on that board? I know there are a few different variants we've shipped, and IIRC some of them have different temperature sensor behavior. It's possible we're reading it wrong on whatever MCU you have.
chaoschris
Posts: 11
Joined: Mon Dec 18, 2017 4:07 pm

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by chaoschris »

It was this batch of PCBs:
IMG_20210128_231233.jpg
IMG_20210128_231233.jpg (1.04 MiB) Viewed 1697 times
and this is the STM on it:
IMG_20210128_231148.jpg
IMG_20210128_231148.jpg (963.66 KiB) Viewed 1697 times
mck1117
running engine in first post
running engine in first post
Posts: 875
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by mck1117 »

And your other analog inputs read correctly?
User avatar
AndreyB
Site Admin
Posts: 11403
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by AndreyB »

image.png
image.png (427.64 KiB) Viewed 1679 times
Here's mine with latest firmware
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239
chaoschris
Posts: 11
Joined: Mon Dec 18, 2017 4:07 pm

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by chaoschris »

Have some little news here.
The error only pops up when you have no 12V power supply on the device. But the MCU temperature dial still shows a strange Temperature of -12X degrees.
@mck1117: I was testing the TPS on AV5 with the 5 V test pad on the board. Measuring with a uncalibrated multimeter i have 4,97V on it. First it looked fine, but the surprise came after calibrating the TPS signal. 5 V from the board showed up a ADC count of 1104, which is really a lot more than the expected 1023....
User avatar
AndreyB
Site Admin
Posts: 11403
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by AndreyB »

How blocked are you by this issue at the moment?

Yours is quite an early 0.4.7 board with the 407 chip. While we still run 407 firmware most boards are 427 hardware these days. Theoretically that should not matter. Theoretically any stm32f407-disco1 would be affected if that would be a 407 issue which they are not. I have no idea what's going on.

I can offer you a deeply discounted just board without case once next batch arrives.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239
mck1117
running engine in first post
running engine in first post
Posts: 875
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by mck1117 »

chaoschris wrote:
Fri Jan 29, 2021 3:34 pm
Have some little news here.
The error only pops up when you have no 12V power supply on the device. But the MCU temperature dial still shows a strange Temperature of -12X degrees.
@mck1117: I was testing the TPS on AV5 with the 5 V test pad on the board. Measuring with a uncalibrated multimeter i have 4,97V on it. First it looked fine, but the surprise came after calibrating the TPS signal. 5 V from the board showed up a ADC count of 1104, which is really a lot more than the expected 1023....
We actually lie about adc counts for TPS inputs, so don't worry about the fact that it's over 1023. Those are actually 5 millivolt steps, so 1104 = 5.52 volts, which is still wrong.

Can you check the voltage at the middle of JP1? It's between the STM32 and USB connector, and the middle pad should measure very close to 3.3 volts. While you're at it, you can also check the 3.3v test point over on the left side of the board near the power LED.
User avatar
kb1gtt
contributor
contributor
Posts: 3715
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by kb1gtt »

After the op-amp with a 5V input, you should see something more like 2.5V. Can you measure AV5 at the stm32 pin? What voltage do you get there?
Welcome to the friendlier side of internet crazy :)
mck1117
running engine in first post
running engine in first post
Posts: 875
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by mck1117 »

kb1gtt wrote:
Fri Jan 29, 2021 9:36 pm
After the op-amp with a 5V input, you should see something more like 2.5V. Can you measure AV5 at the stm32 pin? What voltage do you get there?
I don't think that will yield much - both the TPS and internal temp sensing read wrong, which means it might be a vref problem (JP1 is the vref selector, center pin is connected to the STM32's VREF+ pin).
User avatar
kb1gtt
contributor
contributor
Posts: 3715
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by kb1gtt »

Ah, the JP1 thing. Yeah we got ride of that after some testing.
Welcome to the friendlier side of internet crazy :)
mck1117
running engine in first post
running engine in first post
Posts: 875
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by mck1117 »

kb1gtt wrote:
Fri Jan 29, 2021 9:42 pm
Ah, the JP1 thing. Yeah we got ride of that after some testing.
His jumper goes the other way as my 0.4.8 I'm looking at here. Might be worth cutting it and flipping to the other side if the result isn't 3.3v.
User avatar
AndreyB
Site Admin
Posts: 11403
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by AndreyB »

We have "ADC vRef voltage" setting located in the most weird place - it's located in Controller->Connection.

Please try 3.0 instead of 3.3 or 3.3 instead of 3.0? :)
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239
mck1117
running engine in first post
running engine in first post
Posts: 875
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by mck1117 »

AndreyB wrote:
Sat Jan 30, 2021 12:21 am
We have "ADC vRef voltage" setting located in the most weird place - it's located in Controller->Connection.

Please try 3.0 instead of 3.3 or 3.3 instead of 3.0? :)
1104 (actual) / 1000 (expected) = 1.104

3.3 / 1.104 = 2.989 volts vref

Yep, math adds up. Change vref to 3.0 volts, or flip the jumper to the other side.
chaoschris
Posts: 11
Joined: Mon Dec 18, 2017 4:07 pm

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by chaoschris »

Thumbs up to everybody here, this was the solution!
After correcting the Vref it is working.
rusEFI_ECUTemp_correct_Vref.png
rusEFI_ECUTemp_correct_Vref.png (80.38 KiB) Viewed 1604 times
I am not sure the measured Vref of 2,52Volt is correct, so I have dig a bit deeper into this. The Voltage divider for the Vref should provide a higher voltage than this. But all measured values seems to be correct now.
Thanks a lot to all.
Best regards,
Chris
mck1117
running engine in first post
running engine in first post
Posts: 875
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: microRusEFI shows CPU Temperature Error with Firmware newer than 2020 Sausage Pizza Day (11.10.2020)

Post by mck1117 »

chaoschris wrote:
Sat Jan 30, 2021 10:37 am
I am not sure the measured Vref of 2,52Volt is correct, so I have dig a bit deeper into this. The Voltage divider for the Vref should provide a higher voltage than this. But all measured values seems to be correct now.
If you're worried about it, the best thing to do is to cut the jumper between the middle and top of JP1, and solder across the bottom of JP1. That will tie vref to 3.3v (same as the analog supply), and avoid any problems in the future.

edit: later revisions of the board have that change made by default from the factory
Post Reply