The propeller has no interrupts and no built-in peripherals.
That confuses me, no interrupts. I thought of each core as if it was a individual microcontroller with all of the same concepts (interrupts, timers, ect..), where on each I could run a single sequence of code and pass data between the cores. I guess there's a different way how I should comprehend this??
That's basically right, although some details will vary.
Many realtime operations are conceptually FSMs like:
task() {
initialSetup();
while (1){
event = waitUntilEvent();
switch (event) {
case eventX:
doSomethingX();
break;
case eventY:
doSomethingY();
break;
}
}
}
For a UART eventX might be bitReceived and eventY might be endOfCharacter
For a telephone exchange eventX might be receiverLifted and eventY might be numberReceived.
And events can also be messages from other cores.
If you only have a single core then typically bitReceived might be a hardware line that causes an interrupt, an ISR creates the event and puts it in a queue then ISR returns, finally the event is"picked up" from the queue by the waitForEvent() function.
Without interrupts there is no ISR and no queue; the waitForEvent function simply spinloops looking at the bitReceived and endOfCharacter inputs. When either occurs the function returns and processing continues. The spinloop tends to implies that each core is dedicated to a single peripheral, but that need not be the case in practice.
In some devices the spinloop might not even be a loop; the core might sleep until an event occurs - but that is merely a power consumption optimisation.