Firmware developent status

It's all about the code!
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

beta-version of the new microsecond scheduler is ready - there are some loose ends I would need to clean up, but the code is functional and I have already seen the improvement in self-simulation precision.

I've set a daily auto-update of the online source code reference

Need humans to read the code & ask questions so that we can get the documentation to a meaningful state.
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

Finally pwmtest FREQ command is ready (but not really) - it would be useful to try different frequencies of single-timer signal output. Took me some time because I was reducing memory consumption for simple one-wire PWM.

Not really because my C++ skills have exceeded the older GCC 4.6 smartness - so build server is not compiling fresh versions automatically for now, you can only try this from source code. And another thing - apparently I still have a bug in the scheduler, so stay tuned!
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

@ has fixed the build server and I am still working on hybrid scheduler stability.

The middle line is 1KHz, some ugly jitter:
Image
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

I am banging my head against a wall, time to post this bug @ freelancer.com :(

https://www.freelancer.com/projects/C-Programming-Embedded-Software/stm-find-fix-bug-software.html

Image

One day we will have more software developers here, at least I hope so...
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

Apartment hunting is hopefully over so I am back to life.

FINALLY http://rusefi.com/forum/viewtopic.php?f=5&t=2&p=8161

So, it seems to be stable and it seems to be pretty precise - worst jitter I see is 5us which is not bad. Maybe someone would find a way to improve that? :)
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

Working on analog inputs usability
Image
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

While I am waiting for mostly-assembled Frankensteins for kickstarter backers, power supply components and brain board, I will refactor the code a bit. Also planning to improve ignition logic a bit in order to improve timing while rapidly changing RPM, that's mostly cranking.
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

Wasted two days on a silly max stack usage bug :( At least next time this happens the new stack usage assertions would help to figure it out faster.

Plan for tomorrow is http://sourceforge.net/p/rusefi/tickets/18/ - serial port reassignment using the blue button.
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

While working on Speed Density I've realized that current Tuner Studio implementation is barely useable - burning any changes takes too much time. Made some progress today - implemented advanced 'pageActivate' and 'pageChunkWrite'. I guess crc32 support in TunerStudio protocol would be the next step.
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
3400tZ
contributor
contributor
Posts: 16
Joined: Sat Jan 04, 2014 5:30 am

Re: Firmware developent status

Post by 3400tZ »

Here is an implementation of that CRC validated protocol I did a while ago if that can help: https://github.com/scudderfish/MSLoggerBase/blob/master/MSLogger/src/uk/org/smithfamily/mslogger/comms/CRC32ProtocolHandler.java

This is unfortunately the "wrong" side of thing, it is what would be implemented in TunerStudio, not on the firmware side, but it might still help, so I'm posting it here just in case :)
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

3400tZ wrote:This is unfortunately the "wrong" side of thing
Exactly :( Appreciate it anyway!

Funny thing is that technically the protocol, at least 'msEnvelope_1.0', is still not fully CRC-protected - the first two bytes, the PAYLOAD SIZE, are not protected. If you get corrupted two bytes there is no way to know that, all you can do is check that the size is not crazy and read with timeout. They could have improved this if they would have added a 8 bit CRC for the first two bytes. Let me actually email them on this :)
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

I have a feeling ChibiOS has a bug in UART driver which they did not have before. I recall TS integration was pretty reliable on both UART and serial-over-USB ports with older Chibi versions, and now it's really bad on UART and works flawlessly on serial-via-USB. Had to create a test suite to test Chibi serial :(

Only problem I've lost two days on this :(
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

russian wrote:I have a feeling ChibiOS has a bug in UART driver which they did not have before.
Cannot reproduce the issue with ChibiOS examples, so the issue is somehow related to rusEfi code. Damn, that would probably be a couple more days of troubleshooting.
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
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: Firmware developent status

Post by puff »

related to crc verification or to the port remapping?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

puff wrote:related to crc verification or to the port remapping?
Could be related to performance in general, still trying to figure out the exact reason.
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

Definitely not ChibiOS bug - definitely performance issue on my end. I am making all periods and timeouts configurable to address this.
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

Tuner Studio CRC protocol implementation is complete, but there is still an issue of UART overrun. I'll leave it as is for now, probably will look into that later - at least now I kind of know what it is about. Still waiting to hear from Tuner Studio support if they have an option to limit maximum packet size - if they do not, I will probably have to re-shuffle the Tuner Studio config to make the pages smaller.

Anyway, now I need to fix a couple of bugs @ has discovered.
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
3400tZ
contributor
contributor
Posts: 16
Joined: Sat Jan 04, 2014 5:30 am

Re: Firmware developent status

Post by 3400tZ »

I think blockingFactor in the [Constants] section is what you're interested in ? Add "blockingFactor = 256" for example somewhere in that section and that should do it I think... If I'm understanding what you want correctly. :D
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

3400tZ wrote:I think blockingFactor in the [Constants] section is what you're interested in ? Add "blockingFactor = 256" for example somewhere in that section and that should do it I think
Yes! It really looks like that's what I was looking for! Thank you man! I will definitely put this into my config.
I will write about another TS issue I am having once I play with blockingFactor, maybe you would be able to help also.

See also http://www.msextra.com/forums/viewtopic.php?f=122&t=42155#p296460
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

Digital sniffing protocol has changed in order to transfer more data into dev console - older console is incompatible, you would need to update.
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

Console mode selection (USB/UART) has moved from the blue user button to PB1 - that's because the blue button which is on PA0 is actually also an ADC channel, so there is a conflict once you snap Frankenstein on your discovery.

No PB1<>GND jumper on startup: console is on USB.
With PB1<>GND jumper on startup: console is on UART.

I've also added info command and this command displays the state of this button - that's useful for troubleshooting.
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

Couple of Russians are really testing all this stuff out, any takes for known issues?
For example https://sourceforge.net/p/rusefi/tickets/68/ and https://sourceforge.net/p/rusefi/tickets/71/ do not require any deep dives.
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

I/O test mode is something I use to test Frankenstein boards. I've implemented a jumper switch to enable this mode using the pre-compiled firmware.
http://rusefi.com/wiki/index.php?title=Manual:Hardware_Test_Mode
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
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: Firmware developent status

Post by puff »

what's the methodology of testing? you suggest using a small bulb? (each time connect it to constant '+' and inj1-inj12 and then '-' and hi-lo outputs?)
testing inputs should be much easier - just connecting some cell battery and watching the add readings in devconsole?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

puff wrote:what's the methodology of testing? you suggest using a small bulb? (each time connect it to constant '+' and inj1-inj12 and then '-' and hi-lo outputs?)
Exactly. I was using a 5W bulb for my low-side channels and an LED for the high-side.
There is code for analog input testing in I/O testing mode, but it does not seem to be working right now. Will probably fix it later.
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

Got a response regarding my problem with multi-page configurations in our TunerStudio configuration
I might need to add
enable2ndByteCanID = false


The really funny thing? Google is not aware of "enable2ndByteCanID"! I will now mention this here and anyone searching for "enable2ndByteCanID" would end up here. How cool is that?
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

ADC is now being tested in board testing mode.
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

The magic enable2ndByteCanID did not help :( Here is my issue with Tuner Studio pages, step by step with logs:

1) create new project using https://svn.code.sf.net/p/rusefi/code/trunk/firmware/tunerstudio/rusefi.ini
2) Tuner Studio reads all the pages as expected:
(page 0 - size 1380)
x00 x03 x50 x00 x00 x93 xFD xF7 xA2 ..P......
x00 x07 x52 x00 x00 x00 x00 x64 x05 x58 xDD x7D xCC ..R....d.X.}.

(page 1 - size 324)
x00 x03 x50 x01 x00 x8A xE6 xC6 xE3 ..P......
x00 x07 x52 x01 x00 x00 x00 x44 x01 x01 x68 x4E xD2 ..R....D..hN.

(page 2 - size 1024)
x00 x03 x50 x02 x00 xA1 xCB x95 x20 ..P......
x00 x07 x52 x02 x00 x00 x00 x00 x04 x63 x83 x42 xF2 ..R......c.B.

(page 3 - size 1024)
x00 x03 x50 x03 x00 xB8 xD0 xA4 x61 ..P.....a
x00 x07 x52 x03 x00 x00 x00 x00 x04 xA8 xDF x91 x57 ..R.........W

Full log: https://svn.code.sf.net/p/rusefi/code/trunk/misc/ms_logs/page_issue/TunerStudioAppDebug.first_launch.txt
3) close Tuner Studio
4) 'Open Last Project'
and now things do not work right:
(page 0 - size 1380) - that fine
x00 x07 x52 x00 x00 x00 x00 x64 x05 x58 xDD x7D xCC ..R....d.X.}.
x00 x07 x52 x00 x00 x00 x00 x64 x05 x58 xDD x7D xCC ..R....d.X.}.

size 324 but WHAT PAGE?
x00 x03 x50 x00 x00 x93 xFD xF7 xA2 ..P......
x00 x07 x52 x00 x00 x00 x00 x44 x01 xCA x34 x9D x77 ..R....D..4.w

size 1024 but WHAT PAGE?
x00 x03 x50 x00 x00 x93 xFD xF7 xA2 ..P......
x00 x07 x52 x00 x00 x00 x00 x00 x04 x2E x4B xE3 xF9 ..R.......K..

Full log: https://svn.code.sf.net/p/rusefi/code/trunk/misc/ms_logs/page_issue/TunerStudioAppDebug.second_launch_trancated.txt

What is it? Issue with my config? Some issue with my protocol implementation?
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Firmware developent status

Post by AndreyB »

I've just merged all TunerStudio configuration pages into one and it seems to be working fine with blockingFactor = 256.

Also build server temporarily moved to Windows platform - CodeSourcery compiler seems to be more stable.
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