Long time no posting because I've been very busy on my project.
I've been reading the forum every so often and it is already a great knowledge base you have there.
The datalogger project I'm working on originally targeted being able being able to datalog up to 5 analog sensors at millisecond sampling rate on my old car (a Mazda MX3 V6) for engine diagnostics.
This was working more a less right with raspbian/ATMega, but there were glitches in the datalogging so I wasn't happy at all.
I then started with Ultibo 1 year or so ago and to make a long story short, I can now easily datalog 48 analog sensors using 8 ATMegas (Arduino pro mini hardware) in parallel and hundreds of digital or slow analog sensors in less than a millisecond without any glitches during writing on USB stick, all this displaying fancy FullHD fancy graphics at 60FPS (still no glitches).
The communication metrics are showing less than 20us from ATMega to availability in the RPi memory which is well above what the ATMega ADC is capable running 10 bits conversion.
This requires a RPi3 A+ or B+.
An RPi3 without the "+" will just reach 85°C+ in no time! (more on that later)
The ATMega 328p runs in pure assembler without a single byte RAM used (all registers).
The communication Protocol is home made. I started with SPI but figured out that high speed communication was not possible over a meter or so, which I did require.
The protocol is now basically a 2 bits parallel conversational communication with one clock from master and one clock from slave. This is of course done through bitbanging but still allows 50000 communications per second (4 bits query, 10 bits reply).
So if considering actual data payload, my bitbanging wouldn't look that ridiculous compared to a Mhz SPI communication like the ATMega is capable of and I am not limited by a meter or so anymore.
Now my next steps are:
1/Use Garry's advices on using timers of each dedicated processor instead of looping stupidly and pushing the processor 100% waiting for an event.
2/ .png screenshots to post a few pictures to you guys (and maybe become a superstar in having my application figuring in Ultibo application showcase)
Inputs on the things I learnt on the way:
-OpenVG will only run if nested on CPU0.
-When I tried a
Code: Select all
GPIODeviceInputEvent(GPIODeviceGetDefault, PIN_MI, GPIO_TRIGGER_EDGE, GPIO_EVENT_FLAG_REPEAT or GPIO_EVENT_FLAG_INTERRUPT, INFINITE, @edge_callback, nil);
-From what I found in doing my first true multi-processor application (only Ultibo allows to do that easily) is that the shared memory access feels fantastic at the beginning because it's just like each core feels like a separate system that can communicate with others almost instantly.
The funny thing is that when you start pushing things on each core with a millisecond maximum cycle time, this becomes the main bottleneck.
I'm now dreaming of better registers usage to lessen memory access (A bit like I did on the ATMega ).
Assembly programming can certainly give incredible results on a multi processor RPi!