Hi all,
First, there was the issue of the SPI bus having only one status register, so if having two devices requiring different settings, that must be dealt with (this one is solved, but maybe for future reference and other people having problems).
The other issue is that the radio locks up after sending just one or two packets. I'm using one radio to send a message every 2 seconds and the other that has the leds also to receive only, in a setup very similar to the simple server/client in the examples.
Turning on the debugging serial.prints gives some more info, but also it changes the problem, it starts receiving for a longer period.
- I'm getting some Funny no Interrupt! messages, FIFO full and IFFERROR messages.
- Going by the information found in another thread actually disabling those IFFERROR interrupts makes it lock up a lot later, but it doesn't solve it, inevitably it happens.
- introducing a delay in the main loop also makes it go longer before locking up (weird!)
Using a logic analyser, I've found that the SS behaviour of both devices is good, they are not inadvertedly writing or reading during the other devices SPI communication. However I'm positive but not absolutely certain that is also the case of the SPDR register. (Sidenote: the radio really doesn't like it's clock probed during initialisation, it always failed init if i connect a probe to the CLK line, but after finishing initialisation it seems not so impacted and I can see it toggling during SPI transfers)
I'm not exactly sure what "locked up" means, I've been reading a lot of threads on this group, possibly it means deadlocked?
Without the introduction of the Leddriver code the radio is absolutely fine, so it must be something in the SPI interaction, but what? Any clues? What am I looking for?