Audio Library Causing Phantom Packets With NRF24l01+

Status
Not open for further replies.

Electric Potato

Well-known member
Hey guys,

I'm trying to troubleshoot a build that uses a Teensy3.2+AudioShield+nrf24l01 radio module. This unit receives simple 2 byte packets from another T3.2 and uses them to select a drum sample and then play it via AudioPlaySerialflashRaw.

Problem is, the moment the drum sample begins playing, phantom packets start registering on the radio, usually one every 30ms or so. These packets contain erroneous values that mimic whatever the initial legit packet contained. For example I send a single packet of {125,7} then packets containing {7,7} pour in while the drum sample plays, stopping as soon as it stops. This behavior only occurs with AudioPlaySerialflashRaw; AudioPlayMemory and synthesizing work without issue.

I'm assuming that it has to do with things butting heads on the SPI lines, and am hoping for some advice on what I could do, if anything, to get AudioPlaySerialFlashRaw to not impact my nrf24l01+ module. The nrf is connected like this:

RX = pin 0
TX = pin 1
SCK = pin 14
MOSI = pin 7
MISO = pin 12

In the code I have SPI.setSCK(14) and SPI.setMOSI(7).

Basically, Serial Flash and the nrf are both using pin 7 as MOSI and both are using pin 14 as SCK. And then both of them plus the Audio library all share pin 12 for MISO. Is it possible for this setup to work on T3.2, or do I have to have a separate MOSI/SCK/MISO channel for each, ie buy a different board with at least 3 MISO/MOSI ports?

thanks for any guidance!
 
Status
Not open for further replies.
Back
Top