This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1298 slow SPI problem

Other Parts Discussed in Thread: ADS1298

Hello,

I have a very interesting problem with ADS1298.

I have the ADS1298 running on MDK with VC5505 EVM without any problems. Now we have our own design which is based on the c5505 EVM, except that the external interrupt comming from the ADS has been moved from INT1 to an GPIO pin. Another difference is that on our board we have c5505 opposed to vc5505 on the development board.

If I execute the sample code for the ADS1298 on our own board (code is 99% the same except the interrupt is changed to a new pin) I can observe the following behaviour:

  • Interrupts are executed at almost half the speed as they should. For example if I set the chip to run at 8Ksps, it will take 2 seconds to gather that quantity of samples. If I set the chip to 500sps it takes almost 2 seconds to gather this quantity of data.
  • As soon as I comment the SPI read (LLC_SPI_WordLengthRead) function from the interrupt routine everything works properly. Interrupts are called on time every time.

So either SPI reading is slow and it slows down the interrupt routine which then skips over the next interrupt or whenever an SPI read is issued, next interrupt is delayed. 

Additional problem is that I cannot measure any of the SPI lines because they are in the internal layers of our PCB :(

Can anybody provide some help with this, or some ideas about debugging this problem?

 

Cheers!

  •  

    I narrowed down this problem to the usage of different JTAG emulators. I guess this question should not be anymore in this forum but in the CCS support but if you can please answer it it would be very helpful!.

    If I compile the program and download the .out file through the onboard JTAG of the development board everything works fine. But when I take the same file, hook XDS100 emulator to the development board, download the code and execute it, the problems with SPI occur.

    I'm using Code composer 3.3 to download the file through the onboard JTAG, and CCS 4.0 for the XDS100. I use the same GEL file in both cases. What else could be the source of this kind of problem? Are there any additional settings I need to make in the CCS 4.0?

     

     

     

     

  • Hello KungFu Master,

    To move from VC5505 to C5505, you must change PLL configuration to get the proper speed. Please see the migration guide from this link.

    http://processors.wiki.ti.com/index.php/TMS320VC5504/05_to_TMS320C5504/05/14/15_Migration

    You can also get the ECG code based on the C5505/15 from http://code.google.com/p/c5505-ezdsp/

    Hope this helps.

    Best Regards,

    Peter Chung

     

  • The problem is that the symptoms appear when I use different emulator on the same chip type. When I program the development board (VC5505) using XDS100, problems with SPI start to appear. When I use the onboard emulator this is not happening. I'm using the same GEL file in both cases, so the initialization should be the same. Is the CCS 4.0 doing something else during programming which could mess up some registers? I'm not able to use XDS 100 with CCS 3.3 to see if the problem has something to do with the environment. 

  • Let me clarify one thing.

    The same .out file (without recompiling) works with the on-board emulator but does not work with XDS100?

    Have you tried the on-board emulator with CCS4? Does it work?

     

  • Yes you are correct. 

    The same .out file (no recompiling) works when I download it using Code Composer 3.3 using onboard debugger but not when I download it using XDS100 and CCS 4.0.

     

    I also tried using the CCS 4.0 with onboard debugger and the same problem appears, so I'm guessing that it is something related to setting of CCS 4.

    I tries using several different GEL files but in all cases I get the same result. I even tried using the same GEL file which is executed in CCS 3.3 upon connection of the EVM board but without success.  

     

    HELP! HELP! HELP!

  • It is strange.  I never used CCS4 with the ECG code.  Let me try the same thing here first.

  • KungFu_Master,

    I am able to run the ECG code on the VC5505 EVM with both of CCS3 and CCS4. I created an .out file from CCS3 and used the same .out file with CCS3 and CCS4. This is what I expected.

    Could you send me your .out file so that I can test it here?  

    Best Regards,

    Peter Chung

     

  • Hello,

    I'm sending you attached the test project. It is basically the sample code for ADS1298 with addition of RTC clock which I use for measurement of intersample intervals.

     

    The key part to look after is in the InterruptHandlers.c file in the int1_isr function. I have an array called ExecTimes[100] which stores time for gathering of 7900 samples (The AD is set to 8000 SPS, so this should take a little shorter than 1 second).

    When I execute this code using CCS 3.3 the contents of this variable is (example):

    47, 48, 49, 50, 51.....

    But with CCS 4.0 I have following:

    47, 49, 51, 53....

     

    If I set the AD to speeds of 16 kSPS or higher this difference becomes even more obvious... For example for 32 kSPS on CCS 4.0 this variable is updated only every 10 seconds or slower...

     

    You can rebuild the project and run it, or just use the .out file which is located in the Debug folder.

     

     

    ADS1298ECGSystem.zip
  • Hello,

     

    any news on this? Did you manage to replicate the problem? Do you need any additional input from us on ?

     

    Cheers!

  • Hi KungFu_Master,

    I am observing the same issue here. However, the interval of the DRDY singal from the ADS1298 is 125usec, which is correct. It does not make sense to me why the numbers in the buffer is not in a row. It seems that the if condition (if (smpCounter == 7900)) is not executing every time.... I actually don't know at the moment what causes this. 

    The project is for CCS3 anyway, so it it OK for you to use CCS3 for your development? I will also check some other things to figure this out and it will take some time.

    Thanks,

    Peter Chung

     

  • Hello,

     

    Thank you for pursuing this problem!

    Our problem is that we mush use CCS4 because we are using XDS100 emulator with our board, and this is the part or the code which is critical to get working ASAP. For the time being  we are working on other parts of the code but this is something that must be resolved very urgently...

    I also believe that the problem is not in the ADS1298 itself but something with the interrupt routine which is not executing everytime when the code is programmed using CCS4.

     

    Thanks,

     

     

     

     

  • As a first shot, I'd like to convert the project into a CCS4 project and test it again. Let me try to get you updated by Monday.

    Thanks,

    -Peter Chung

     

  • Peter, can you make a final comment on this thread as to how the issue was resolved.  If someone were to read this thread, it appears to still be an open issue.

    Thanks.