Hi guys,
I am experiencing a very strange set of behaviour which I have been mulling over for weeks and have come to a dead end.
I have an ADS1299 connected to a C6748 DSP, I am attempting to set up the lead off functionality to run continuously @ FDR/4 (FDR = 8KSPS),
I set up all registers by DMAing the following array to the ADS1299
{0x41, 0x16, 0x91, 0xC0, 0x60, 0x00, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00}
I then at intervals of 10mS send the following commands to set the Lead off, config4, lead off sensp and lead off sensn registers.
Lead off = {0x44, 0x00, 0x07};
Config4 = {0x57, 0x00, 0x02};
Sensp = {0x4F, 0x00, 0xFF};
Sensn = {0x50, 0x00, 0xFF};
reading back all registers shows what I would expect and matches a previous version of software I had prior to the implementation of DMA which worked as expected.
ID = 0x3E
CONFIG1 = 0x91
CONFIG2 = 0xC0
CONFIG3 = 0x61
LOFF = 0x07
CH1SET = 0x50
CH2SET = 0x50
CH3SET = 0x50
CH4SET = 0x50
CH5SET = 0x50
CH6SET = 0x50
CH7SET = 0x50
CH8SET = 0x50
BIAS_SENSP = 0x00
BIAS_SENSN = 0x00
LOFF_SENSP = 0xFF
LOFF_SENSN = 0xFF
LOFF_FLIP = 0x00
LOFF_STATN = 0x00
LOFF_STATP = 0x00
GPIO = 0x0F
MISC1 = 0x00
MISC2 = 0x00
CONFIG4 = 0x02
I am then using the data ready signal from the ADS1299 to trigger a DMA transfer of 27 bytes (all 0x00) to the ADS1299 via the SPI bus, with no inputs connected I would expect the needle status bytes to be 0xFF and 0xFF, the actual values returned are 0x87 for the positive and 0x00 for the negative.
Situations that I can get it to work correctly:
- changing from AC lead off (LOFF = 0x07) to DC lead off (LOFF = 0x00) I receive back values as expected for both electrodes based on any combination of leads connected.
- reverting back to my pre-DMA software, I don't see how this could make a difference as all the registers read back match up with the post-DMA version.
The only differences I can see between the two versions of software are:
- DMA instead of interrupt driven SPI.
- All registers written to originally with defaults.
- data capture is now in continuous mode (27 x 0x00 bytes sent instead of 1 x 0x12 followed by 27 x 0x00)
could any of these things cause the issue I am seeing or anything else to try would be helpful.
Cheers,
Graham.