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.

printf issues with eZ430-RF2500

Other Parts Discussed in Thread: MSP430F2274, CCSTUDIO

Hi everyone !

I am just trying to send some data with a prinft function with the aZ430 and the target board RF2500, using CCS v5.3.

I followed everything that was said there : http://processors.wiki.ti.com/index.php/Printf_support_for_MSP430_CCSTUDIO_compiler . I redefined fputs and fputc as suggested, changed the heap size, etc. I adapted the baudrate to 9600 (Clock at 1MHz and thus UCBRx at 104), and the registers that are mentioned on the wiki to the ones of the MSP430f2274 of the target board. I also installed the terminal window in CCS. 

However, when I send basic stuff with the printf function, such as "hello", I can only receive in the terminal window weird characters like "ÿÿÿ~þ~þ~"... Does anyone know how I could fix that ? 

Thank you very very much for your help :-)

Samy

  • Seems like perhaps the baud rate is still slightly off.  I was able to get this to work on the eZ430-RF2500 kit through a combination of a Grace example and including the steps from the aforementioned wiki article.  In case you don't have Grace installed, which you probably due with CCS v5.3, I configured the DCO for 1MHz as you indicated and the USCI_A0 for 9600 baud.

        BCSCTL2 = SELM_0 + DIVM_0 + DIVS_0; 
        DCOCTL = 0x00;
        BCSCTL1 = CALBC1_1MHZ;      /* Set DCO to 1MHz */
        DCOCTL = CALDCO_1MHZ;
        BCSCTL1 |= XT2OFF + DIVA_0;
        BCSCTL3 = XT2S_0 + LFXT1S_2 + XCAP_1; 

        UCA0CTL1 = UCSSEL_2 + UCSWRST;
        UCA0MCTL = UCBRF_0 + UCBRS_1;
        UCA0BR0 = 104;

    Make sure that the terminal window within CCS is configured for 9600 baud as well.
    Also make sure that the USCI_A0 is configured for the correct reference clock you expect.  In the above configuration, SMCLK=1MHz and is the reference clock for the USCI_A0 module.

     

  • Thanks for your help :-) That code and the one I had before work..... it was apparently a problem with the target board I had. I tried with another one and it worked perfectly ! How to waste one day for nothing haha ! 

    Anyway, thanks again !

    Samy