Jump to content
43oh

dblob

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. Forgot to add the code.. 2452_code.c /* echos back received bytes */ #include <msp430g2452.h> #include <stdint.h> #include "uart.h" #define UART_TXD BIT1 #define UART_RXD BIT2 #define RED_LED BIT0 #define GRN_LED BIT6 uint16_t wdtCounter = 0; inline static void init_clock(void) { /* set main clock to 8MHz */ DCOCTL = 0x00; BCSCTL1 = CALBC1_8MHZ; DCOCTL = CALDCO_8MHZ; /* set sub-main clock to 1MHz */ //BCSCTL2 = DIVS_3; BCSCTL2 = SELM_0 | DIVM_0 | DIVS_3; // BCSCTL2 &= ~SELM0; // MCLK comes from DCO // BCSCTL2 &= ~SELM1; //
  2. 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 = D
×
×
  • Create New...