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.

How to use ADS1298-MSP430F5438_Demo ?

Other Parts Discussed in Thread: ADS1298, ADS1298-MVK

Hello, 

Recently I started to use MAVRK with an ADS1298.

The demo program, ADS1298-MSP430F5438_Demo builds, and then in main() it initializes the hardware,

and everything looks fine.

Then is an infinite while loop. In this loop, i expect to get some data (in the else ifs) , but instead of it,

I am still visiting the:

			// If we are doing prints, this function will enable the next character to be printed
// Not needed if are doing all flush prints
if (mvk_Is_Next_UART_State_Ready ())
{
mvk_UART_PrintF_State_Machine ();
}
and the mvk_UART_PrintF_State_Machine () is only called in a single run of while(1). 
But how it's printing the states?
Reading the comments doesnt help me: I don't unserstand the meaning of 
BYPASS_QT_FORMATTING define (or rather undefine), I dont know what is the Hyper Terminal for,
and mainly I dont get how it works. 
Can you please briefly write how to use the program, and what is its normal work cycle?
Best Regards,
Rafał
  • Hi Rafal,

    I am guessing that you are doing some digging into the code, if I am not correct, and you aren't seeing data on the QT application, please let me know and I'll go down that road with you.

    We don't have a lot of user's wanting to dig deep in the code today, I am guessing that will change in the future.

    You can get more details on the UART here:

    http://processors.wiki.ti.com/index.php/Software_-_MAVRK_UART_Functions

    But, a couple of quick answers to your questions.

    HyperTerminal is a Windows Program that will display ASCII characters from a COM port.   We send raw data out for the QT application that also includes Headers and Types of Data, Commands, etc...  Some users would like to see just data in it's raw state.   That is what the BYPASS_QT_FORMATTING is for.  It strips the Header information out so that it doesn't appear on the terminal screen.

    UART trasnsmission (as is I2C) is a very slow with respect to the clock on the MCU.  If we send out a string of characters by polling the UART TX flag, we will lose a large of CPU cycles.   So we have designed a threader that will buffer the data, transmit a byte, and then release the CPU to do other things.   When the byte is done, we transmit another one, and so on.   This very efficient as we actually have 3 of the UARTs possibly communicating on MAVRK:

    1.  One to the PC Application through the Serial to USB converter.  2) One to the RF port, typically used as modems to RF components (WiFi or Bluetooth for example) and one to the AFE slot for RS485 transceivers or embedded control functions, like the SCI-DRV8814-MVK.

    The mvk_UART_PrintF_State_Machine is, in its basic form, an initiation of the next UART byte in our buffer.  It is triggered when ever the last byte is sent, which is checked by the if statement above it (mvk_Is_Next_UART_State_Ready).

    Hope this helps!

  • Hi,

    Thanks for the answers. I will now try to be more precise:

    protagonist said:

    I am guessing that you are doing some digging into the code, if I am not correct, and you aren't seeing data on the QT application, please let me know and I'll go down that road with you.

    This is true, I'm doing a little bit of experimenting with this boards. Sadly, I don't get any data in the Qt app. The MCU sends the DATA packet to the ADS AFE, and no response is made from AFE side. 

    http://processors.wiki.ti.com/index.php/Software_-_MAVRK_UART_Functions - This one is really useful, thanks. I didnt notice this doc.

    protagonist said:

    HyperTerminal is a Windows Program that will display ASCII characters from a COM port.   We send raw data out for the QT application that also includes Headers and Types of Data, Commands, etc...  Some users would like to see just data in it's raw state.   That is what the BYPASS_QT_FORMATTING is for.  It strips the Header information out so that it doesn't appear on the terminal screen.

    Ok, so now I see, we load the program into MSP430 with BYPASS_QT_FORMATTING defined, so we can omit the headers, so the data will not be presented in the Qt app, because it is in "malformed" format?

    Can I see the data either in HT and in Qt? Isn't it like if Qt app uses the COM port, the HT cannot use it?

    protagonist said:

    UART trasnsmission (as is I2C) is a very slow with respect to the clock on the MCU.  If we send out a string of characters by polling the UART TX flag, we will lose a large of CPU cycles.   So we have designed a threader that will buffer the data, transmit a byte, and then release the CPU to do other things.   When the byte is done, we transmit another one, and so on.   This very efficient as we actually have 3 of the UARTs possibly communicating on MAVRK:

    OK, that seems reasonable.

    protagonist said:

    1.  One to the PC Application through the Serial to USB converter.  2) One to the RF port, typically used as modems to RF components (WiFi or Bluetooth for example) and one to the AFE slot for RS485 transceivers or embedded control functions, like the SCI-DRV8814-MVK.

    I'm willing to using just the 1 scenario for now.

    protagonist said:

    The mvk_UART_PrintF_State_Machine is, in its basic form, an initiation of the next UART byte in our buffer.  It is triggered when ever the last byte is sent, which is checked by the if statement above it (mvk_Is_Next_UART_State_Ready).

    So what does it means, that MCU is making circles there? Is MCU sending something thru UART that ADS is not collecting (not responding?)

    I also have another questions:

    1. When I load the program, using a CCS, I should be able to see the incoming data in the main() func, right?
    2. And, what's the program I am loading using AppSelector? Is this just your released version of the DEMO (Can I load there my program too in the future? - this one is just because of curiosity).
    I hope you can help me in making this thing running.
    Best Regards, 
    Rafał
  • Hi Rafal,

    Very good, I had guessed that you may not be seeing the data, but I didn't want to make any assumptions.

    Let's start by getting you data on QT.  If you would, could you install this tool.  It's just been released by the MAVRK team and hopefully will make things easier for you to get the demo running.

    http://processors.wiki.ti.com/index.php/MAVRK_AppSelect_and_AppMonitor_Software_Installation_Guide#Install_Package


    After that, let's make sure your COM port driver was updated correctly:

    http://processors.wiki.ti.com/index.php/Software_-_Troubleshooting_the_MAVRK_COM_Port_Connection_to_QT

    Then if you can update your Motherboard to support our Bootstrap Loader it will make the demo easier to change.

    http://processors.wiki.ti.com/index.php/Software_-_Installing_the_MAVRK_Bootloader_on_the_STK-PRO430-MVK_Motherboard#Installing_the_Bootloader_using_the_MAVRK_AppSelect_Tool

    Finally, if you select the Bio-Potential measurement demo featuring AFE-ADS1298-MVK, and select Download and then Go, the ADS1298 data should show up on the QT.

    Let us know if that get's you going.

  • Hi, 

    I followed your helpful advices, and i got this thing running, I'm receiving the data! Thanks!

    I have two problems, which I will try to resolve, and using your help the solution will come faster:

    1: CCS

    When I debug the program in CCS, i can't simply go to next instruction (with step into or step over) because Im always going to:

    #pragma vector = IO_PORT_2_VECTOR
    __interrupt void mvk_IO_PORT_2_Exception (void)
    {
    mvk_IO_Port_2_ISR ();
    mvk_Power_Up_CPU_On_Exit (0x10);
    }
    And I can only see the flow using breakpoints, which is annoying.
    But Im still happy that it enters the if ((ADS1x9x_Status_Flags.ADC_Data_Ready == SET) && (startFlag == SET)) section, so now I can do something with the program.
    
    

    2. Qt App 

    My output is very unclear: I use a normal sinus rithm generator, in which I changed the batteries recently (but Im not sure they are good, and now I can't measure it).
    It looks like this: 

    As you can see, this seems to be little bit similar to the ECG signal (you can observe the QRS and P waveforms).

    The beat is 160BPM here.

    Do you have an idea why the output is so noised? Probably I'm doing something wrong with my generator.

    Kind Regards, 

    Rafał

  • Hi Rafal,

    Excellent that you are seeing data!

    Yes, that annoying ISR you are continually seeing is the ADS1298 telling you it has new data.   Since it is in a Continuous mode, it's probably hitting you about 105,000 times a second.   That's going to be tough to step through without interruption.

    We can put the ADC in a Stop Data Continuous Mode, that will stop the ADS1298 from continuously converting data, or of course we can turn off the Interrupt by Disabling it.  Of course that's going to stop the QT from showing up.

    I am guessing your issue is one of the pinout of the connector on the SCI-ADS1298-MVK and your generator.   Do you a device number or part number I can research for you to give a suggestion?

  • Hi, 

    Thank you for ur last post, now I understand the meaning of this interrupt.

    I managed to get the good data, but I still have problems.

    Unfortunately, I don't use the MVK boards (ADS1298-MVK and SCI-ADS1298-MVK). These boards are now inaccesible for me. But, instead of this, I have the standard ADS1298-AFE, and MAVRK-AFE-BREAKOUT. I need to work with this solution for my studies, so I had to think something out.

    I know this may not be the standard solution, but while it uses the same ADS1298 SOC and the schemarics are really similar - this should be working.

    I can send you the schematics of the connections I made with cables, but now I dont have them in digital form. Instead of this, I will show you a picture I took today:

    As you can see, I use AFE-BREAKOUT to get the BUS signals, like SPI control and SPI data, !DRDY (interrupt), !RESET and the signal causing the problems: START.

    The START signal, in ADS1298-MVK is the GPIO4 signal - the 4th pin in P1 on the  AFE-BREAKOUT.

    Problem is, that each time I load (Download from USB, as you sugested) and run the program (Go) the GPIO pins logic levels are different (I noticed this because there are diodes lighting when logical level is 1). 

    So, when the GPIO4 is low, the START is inactive, and I don't receive the data. 

    But, when I connect the START signal to high (3.3V DVDD at pin 1 on P1) The data is coming. So this is working a bit (I have this "noised" digital signals i posted lastly). Unfortunately, then the START is hardware put in the high state (because I connect the pin to high) I cant set and see the proper values of ADS registers. I think I understand this, because START signal is meant to be active only during conversions and data sending cycles. When I want to read registers using Register Table Manipulations - i only see 0 there. So, when the registers bits are set to 0, especially the CONF3 register has the 0 bits on the RLD drive settings, thich means that the RLD measurment is powered down, and the RLD buffer is off. So, this is responsible for the noisy digital output content.

    The most interesting thing is, that sometimes, I have proper GPIO bits settings - as you can see in this pic (sorry for poor quality):

    When the GPIO is set properly, when I can read the registers (but not during the continous read), the values are OK (RLD is ON).
    The Qt app shows proper data (please ignore the invalid chart - the generator I'm using is not the best):

    During the data read (Conversions are enabled), I can't read the proper values of registers. The values are randomed. I thought that ADS can do it, but when now I consider the ADS demo for MMB0, i remember the reg read was not possible during the CONTINOUS data read.

    Do you know thy the GPIO's are set wrong?

    Maby I have the problem with the OE signal on the GPIO's latches on BREAKOUT? So then the signals are always 0? 

    Can you still help me please?

    King Regards, 

    Rafał

  • Hi Rafal,

    Very cool!  When we defined the AFE-Breakout (and RF-Breakout for that matter), what you are doing is exactly what we envisioned where the breakout could be used.  The other of course is the capability of adding a logic analyzer and being able to see the signals on the AFE slot next to it.

    I think I may know your issue with the START pin.   We moved it to pin 5 in our Rev B version.   Here is the schematic:

    http://processors.wiki.ti.com/images/4/4f/6519918_AFE-ADS1X9X-MVK_SCH_B.pdf 

    That's the challenge of keeping up with many code pushes while we are developing our modules.    When the new boards come we change our code to support them.

    Give that a try and see if it helps.

     

  • Hi again, 

    Thanks for suggestion, I will keep that in mind.

    I figured out what is wrong just a moment ago :)

    I looked deeper into the code and schematics - during the mvk_Enable_ADS1x9x_Conversion (ADS1298_DEVICE_SLOT); call, the START pin is configured. In the BREAKOUT module, the AFE_X_LATCH_ENABLE signal is responsible for LE in BREAKOUT. But, the program is for the ADS1298-MVK, where the LE is connected directly to MOD_SEL signal.

    The MOD_SEL in BREAKOUT is pulled to DVDD. The most importnant - AFE_X_LATCH_ENABLE is connected to the P4 pin 10. So I just connected it to DVDD, and now the solution works all the time!

    A quick question: Can you suggest me some cool connection settings in HT to see data in some user friendly encoding? I mean the: File->Properies? For example: Emulation option (ex. VT100).

    How can I extract normal HEX numbers I see in the Qt app?

    Which one is the best, when I would like to capture the data, and take it to excel and make a chart? 

    I will probably have to write a program which will extract numbers (values of the channels) from these letters, but maby tommorow.

    Kind Regards, 

    Rafał

  • Hi Rafal,

    We do have a function built into the AppMonitor that will allow you to log your data.

    If you utilize the Table Page:  http://processors.wiki.ti.com/index.php/MAVRK_AppMonitor_User%27s_Guide#Table_Page

    You can utilize the Log Incoming Data:  http://processors.wiki.ti.com/index.php/MAVRK_AppMonitor_User%27s_Guide#How_to_read_the_Table_Page  

    Pressing it once starts the data logging, pressing it again allows the data to be saved.

  • Hi,

    OK! This app is really useful, taking data from HT was not the best idea. Now I have a nice excel chart. 

    So, when I finally started the hardware and got the proper data, I can start some coding. First of all I will write signal filtering, then QRS detection, and probably some pace detection.

    Thank you for all the great help!

    I will keep informing you about my progress.

    Kind Regards, 

    Rafał Radziejewski