Stamp Background Tasks
oopBot
Posts: 1
Do the Javelin background tasks execute in parallel with the main program, similar to separate processes on a computer. Furthermore, are the background tasks as independent and parallel as FPGA or CPLD (field programmable gate array, complex programmable logic device) IO, which execute multiple parallel instructions simultaneously?
Also, is it possible to create a class, instantiate it, and set it as a background task? In c/c++ the command for this would be fork(). Is there something similar to this for the Javelin Stamp's subset of Java. i.e. can I create and execute multiple processes, and use some form of IPC (inter-process communication) to exchange data between running processes?
Thanks
Also, is it possible to create a class, instantiate it, and set it as a background task? In c/c++ the command for this would be fork(). Is there something similar to this for the Javelin Stamp's subset of Java. i.e. can I create and execute multiple processes, and use some form of IPC (inter-process communication) to exchange data between running processes?
Thanks
Comments
The javelin has a deterministic interrupt tick of 8.68 microseconds.
The available background tasks are: a single 32bit Timer that you can use
for as many Timer objects you want, transmit and receive uarts, ADC, DAC, PWM.
These tasks execute inside the interrupt routine.
Your main code communicates with these tasks via registers, but this is hidden
inside the classes for those tasks.
You can simulate multiple threads by using state machines combined with Timers.
regards peter