Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

msp430g2452 simple UART

$
0
0

Hi all,

 

I am trying to implement/edit an UART library (https://github.com/wendlers/msp430-softuart) on 2452 to run on MCLK 8MHz and SMCLK at 8MHz (by /8 divider).

    BCSCTL1 = CALBC1_1MHZ;
    DCOCTL = CALDCO_1MHZ;

Then I changed the MCLK to 8MHz and divided the SMCLK to 1MHz, but even after some magic with USB ports (I am using debian) or restarts I can't get it working as in the initial version (which still works when I reflash the chip).

The changed snippet in 2452_echo.c:

    BCSCTL1 = CALBC1_8MHZ;
    DCOCTL = CALDCO_8MHZ;

    /* set sub-main clock to 1MHz */
    //BCSCTL2 = DIVS_3;
    BCSCTL2 = SELM_0 | DIVM_0 | DIVS_3;

Any hints?
Thank you, b


Viewing all articles
Browse latest Browse all 2077

Trending Articles