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.

CCS/MSP-EXP430F5438: MSP-EXP430F5438 Experimenter Board : User Experience Code is not working

Part Number: MSP-EXP430F5438

Tool/software: Code Composer Studio

Hi All,

I would like to get some help to get defualt MSP-EXP430F5438 Experimenter Board : User Experience Demo Code.

I have downloaded it from CCS resource Explorer MSP430 and loaded to board. It just Shows backlight LCD,nothing else like I see in Video demo.

https://www.youtube.com/watch?v=_SwqtiAtKSM

 

Please help me with demo code to explore more of board Features.

I would like to take base demo code and modify according my requriements.

Also, Please help me with any Audio Play back and PWM codes,if already avaible for this board.

 

Regards,

VR

  • Hi VR,
    the SW where are you looking you can find here:
    www.ti.com/.../getliterature.tsp

    The useful Guide where you can find a step by step tutorial you can find here:
    www.ti.com/.../slau263

    and if needed, you can can find the older EVM User Guide (also for the F5438-w/o A device) here:
    e2e.ti.com/.../slau263d.pdf

    All other Information, example codes (like PWM) and so on you can find here:
    www.ti.com/.../MSP-EXP430F5438

    I hope this helps!

    Best regards,
    Jens
  • Hi Jens,

    Thanks for your reply.
    However, I have downloaded same files when I got the kit.
    I have tried them again by deleting older files and tried to load again with the files downloaded today.
    I see same result ,just backlight LCD coming up without any any menu as mentioned in User guide.

    I was able to execute some other small programs wirtten by me like BLink LEd with push button polling and push button GPIO Interrupts.
    But, I cant see any LCD menu user Demo program with SLAC277I.

    Regards,
    VR
  • Hi VR,

    Which device do you used (F5438 or F5438A)? Which compiler do you use and which output format?

  • I have Device F5438A and using Code Composer Studio Version: 7.1.0.00016.
  • Here you can find the Compiler settings:

    Project Explorer -> right click on project -> Properties

  • Hi Jens G,

    It is MSP430 Compiler with Version TI V16.9.3.LTS and Output Format of eabi (ELF).

    Regards,
    Raju
  • Hi

    Please refer to me standalone LCD code (may just slidesshow of few pics) and code of Audio Play from internal flash stored WAV file.
    I will try to make use of them..

    Regards,
    Raju
  • Hi Raju,

    I see you are having a problem getting the LCD to display anything when running the user experience code on the MSP-EXP430F5438 board.

    There is one of the FAQ items in the board user's guide www.ti.com/.../slau263 section 6.1 FAQ #8: "When I run the example code, nothing happens on the LCD". It has a list of things to check - can you please try these?

    1. Can you see the Revision number on the MSP-EXP430F5438 board. The software online is for the Rev 0-03 board, and the rev 0-02 hardware is incompatible. You can also try pausing the code while debugging, to see if it is trapped in the while(1) loop near that beginning of the code that does the board revision check.
    2. It could be that the contrast is just really low so it is difficult to see anything on the display. You can try switching how you are powering the board and changing the power switch accordingly. You can also try changing the contrast setting using the menu options - this will be difficult when you are not able to see the menu, but using breakpoints in the code while running in the debugger, you should be able to determine what menu option is currently highlighted. You'll need to go to the settings menu (the last option in the main menu) and then to select the LCD contrast option, then use the S2 button repeatedly to increase contrast (again you can use code breakpoints to observe what the contrast setting is). Someone had a similar issue here: e2e.ti.com/.../2071062 
     
    Regards,
    Katie

  • Hi Katie,

    Thanks for the reply.
    It Looks like Rev 0-03 or later board as per code execution. It is not struck with while(1) after if (!assert_board_version()) check.
    As per PCB, it is Rev 0-04. I could run example code of Grlib code to see Pictures on LCD and also ran some other expale codes.
    I request you to guide me with any standalone Audio Play code(PWM from Audio file) and record code, which I can test in stand alone mode and then I can integrate it with my requirements.

    I am looking Forward for your reply,struck with this Problem for more than a week.

    Regards,
    Raju
  • Hi Raju,

    There are a couple of TI Designs for audio record and playback for MSP430s using PWM. You may want to try TIDM-VOICEBANDAUDIO or TIDM-FILTERING-SIGNALPROCESSING. These TI Designs include a design guide, example software, and information about the hardware used. For some (TIDM-FILTERING-SIGNALPROCESSING) it even uses only boards available for order on ti.com - e.g. BOOSTXL-AUDIO boosterpack.

    I'd recommend referencing the code & design guides for both of these as your reference - I think that only the TIDM-FILTERING-SIGNALPROCESSING has record functionality, but the design guide for the TIDM-VOICEBANDAUDIO design goes into more detail and theory about PWM DAC for audio playback.

    There are also a couple of useful application notes about PWM DAC: PWM DAC Using MSP430 High-Resolution Timer www.ti.com/lit/pdf/slaa497 and Using PWM Timer_B as a DAC www.ti.com/lit/pdf/slaa116.

    I hope that these resources will help since they are all more focused on the specific type of functionality you are trying to implement.

    Regards,

    Katie

  • Hi Katie, I have tried to use above monetioned referecnes for my Experiment. Somehow, It is not working.

    Please help me with standalone code of PWM Audio on Headset Jack via P4.4 or  User Experience Demo code.

    If User experience Demo works, I can extract working Portion to my requirement.. Looking for froward for your help.

    Regards,

    Raju

  • Hi Katie, I have tried to use above mentioned references for my Experiment. Somehow, It is not working.

    Please help me with standalone code of PWM Audio on Headset Jack via P4.4 or User Experience Demo code.

    If User experience Demo works, I can extract working part of code to my requirement.. Looking for froward for your help.

    Regards,

    Raju
  • Hi Raju,

    Could you please explain what is not working about the other examples so we can provide some guidance?

    For the out-of-box code for the MSP-EXP430F5438, it can be found on the tool folder for that board (click the link for MSP-EXP430F5438 here) or in TI Resource Explorer. Here is a link to it in the web version of Resource explorer: dev.ti.com/.../

    Hope that this helps.

    Regards,
    Katie
  • Hi Katie,

    Many Thanks for your Support.
    I have used example code like Grlib LCD , Timer and Interrupt codes to develop an Interrupt based LCD slideshow.
    However, out of box demo code has never worked for me,Just I could Flash successfully, but no Menu appears and nothing happes as screen is just while backlight without any text. I could not debug this code.Hence, I request you to give me any working code of playback or Play of .wav file converted data string file.

    I have referred few e2e threads and Weblinks to Play Audio or Music of 1 second length files. Somehow, they are not working as expected.
    I was trying to Play Audio through Port P4.4 via Headset jack of MSP-EXP430F5438 using Timer B0 ISR or PWM mode.

    e2e.ti.com/.../219093
    artists.sci-toys.com/speech

    I am not exactly able to debug this code,why exaclty it is not working.
    I was able to string read data and load it in TBCCR0 and but , not getting any audio over headset.
    I have tried with SMCLK of 1MHz and 16MHz clocks.

    Is there any otherway to contact you directly over phone or email, so I can explain it more clearly. I have struck at this Point for weeks.

    Regards,
    Raju
  • Hello Raju,

    If you are trying to output audio via a Timer PWM, the timing of when you place values into the Timer CCRx is very critical. The following TI Design shows an example of this. www.ti.com/.../TIDM-VOICEBANDAUDIO
    Please also remember that CCR0 is used for the output frequency of the PWM and CCRx ( where 'x' is any CCR that is not '0' and is associated with the output pin) is filled with the new PWM value or sound value in this case. CCRx must be filled in a timely matter or the playback sound will be skipped, garbled, or non existent. With this timing being so critical, all interrupts within the system that are not associated with playback need to be turned off during playback.
  • Hi Jace H,

    Thanks for your reply. I have referred few other reference designs and playback codes to use Timer B0.

    However, I am unable to hear any voice or noise with Adaption to my board. I have abasic question.

    How can we hear Audio with 62K or 32KHy PWM frequency. I could hear some noise around 4kHz PWM frequncy with other codes.

    Please suggest.

    Regards,

    Raju

  • Hello Raju,

    What is the bit length for each sample? Also do you have sound files that are at your bit sample + frequency you using? I'm assuming you are referring to playback frequency above. More than likely the issue is you are not filling the Timer CCR in time for audio to play. Please refer to section 3.2 of the above TI Design for more information on playback frequency and bit length .
  • Hi JH,
    Lenght of each sample is 8 bit, which is generated from .wav file with PCM 8bit, 8ksp, mono Format.
    In example codes, always TBCCR0 is set to 0xFF with either 8MHz or 16MHh SMCLK, which makes PWM frequency either 32KHz or 62KHz.
    And, TB0CCR4 is loaded with data of Audio string of 8 bit hex sample. I managed to run PWM on P4.4, but with the PWM frequency of 32KHz or 62KHz , i cannot hear anything from Headset jack.
    With the below code, I was trying to Play Audio string of 4044 characters(8 bit). I can see data toggling on P4.4 with frequncy of 28KHz.
    But, no Audio on Headset. Please correct this code so, I can make changes to get Audio.

    void main (void)
    {
    WDTCTL = WDTPW+WDTHOLD; // Stop WDT
    P11DIR |= 0x07; // Set P11.0,1,2 as O/P for ACLK,SMCLK and MCLK
    P11SEL|= 0x07; // Enable P11.0,1,2 for ACLK,SMCLK and MCLK
    //********************Configure clock SMCLK to 8MHz*****************************//
    unsigned char FD;
    UCSCTL3 |= SELREF_2; // Set DCO FLL reference = REFO
    UCSCTL4 |= SELA_2; // Set ACLK = REFO

    __bis_SR_register(SCG0); // Disable the FLL control loop
    UCSCTL0 = 0x0000; // Set lowest possible DCOx, MODx
    UCSCTL1 = DCORSEL_5; // Select DCO range 16MHz operation
    FD = 244; // N = 244 for 8MHz and 488 for 16MHz
    UCSCTL2 = FLLD_1 + FD; // Set DCO Multiplier for 8MHz
    // (N + 1) * FLLRef = Fdco
    // (244 + 1) * 32768 = 8MHz ,// (487 + 1) * 32768 = 16MHz
    // Set FLL Div = fDCOCLK/2
    __bic_SR_register(SCG0); // Enable the FLL control loop
    __delay_cycles(250000);
    // Loop until XT1,XT2 & DCO fault flag is cleared
    do
    {
    UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + XT1HFOFFG + DCOFFG);
    // Clear XT2,XT1,DCO fault flags
    SFRIFG1 &= ~OFIFG; // Clear fault flags
    }while (SFRIFG1&OFIFG); // Test oscillator fault flag

    //********************Configure clock SMCLK to 8MHz*****************************//
    P4SEL |= 0xFF; // P4 option select
    P4DIR |= 0xFF; // P4 outputs

    __bis_SR_register(GIE); // Enter LPM4 w/interrupt

    TBCCR0 = 0xFF; //SMCLK as CLK source
    unsigned int x;
    char state = 1;
    char byte = 0;
    while(1)
    / {
    int x = 0;
    for( x = 0; x < 4004; x++ )
    {
    TBCCTL4 = OUTMOD_7; // CCR4 reset/set
    TBCCR4 = data[x]; // CCR4 PWM duty cycle
    TBCTL = TBSSEL_2 + MC_1 + TBCLR ; // SMCLK(TBSSEL_2),ACLK(TBSSEL_1), upmode, clear TBR
    __delay_cycles(256);
    }
    }
    }
  • Hello Raju,

    If you have an 8-bit PCM stream that has a playback frequency of 8kHz, and you run that data out at 16 or 32 kHz, then in order to get the same sound, you'll have to double or quadruple your samples respectively. If you do not then you will experience a frequency shift of the sample and either get distortion or no sound out all depending on your output filters.

    Otherwise, you'll have to get a different source data for each of the different playback frequencies you want to do.
  • Hello Raju,

    I was reading this thread and realized that you might be able to reverse engineer the Out-of-the-Box user experience to get your audio application working. Please read through this thread which explains how to get the User Experience Demo to work on your setup. The problem is that you must use the compiler that was present at the time the example code was written. Here is a screenshot to show you the exact compiler version you need and where to change the settings.

    With this info hopefully you will be able to step through the code (especially the audio playback portion of it) to see how it can help you.

    Best regards,

    Matt Calvo

**Attention** This is a public forum