Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 233705

Forum Post: RE: MSP430FR2475: Failing to make EUSCI A UART and EUSCI B I2C work together. UART sends unwanted bytes

$
0
0
Hello Zoey, Thanks for the input, knowning that CS_getSMCLK() causes the problem has been really helpful. While using I2C at register level is an alternative, I wanted to keep DriverLib's I2C implementation as I already have it coded in a project, and I found this thread that solved my issue: https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1257765/msp430fr2355-cs_getsmclk-function-problem-with-uart Following the same modifications that Hoang Anh did, It has basically been changing this: //Set ACLK = REFOCLK with clock divider of 1 CS_initClockSignal(CS_ACLK,CS_REFOCLK_SELECT,CS_CLOCK_DIVIDER_1); //Set SMCLK = DCO with frequency divider of 1 CS_initClockSignal(CS_SMCLK,CS_DCOCLKDIV_SELECT,CS_CLOCK_DIVIDER_1); //Set MCLK = DCO with frequency divider of 1 CS_initClockSignal(CS_MCLK,CS_DCOCLKDIV_SELECT,CS_CLOCK_DIVIDER_1); To this: CS_initClockSignal(CS_FLLREF, CS_REFOCLK_SELECT, CS_CLOCK_DIVIDER_1); //Set Ratio and Desired MCLK Frequency and initialize DCO CS_initFLLSettle(CS_SMCLK_DESIRED_FREQUENCY_IN_KHZ, CS_SMCLK_FLLREF_RATIO); //Set ACLK = REFOCLK with clock divider of 1 CS_initClockSignal(CS_ACLK, CS_REFOCLK_SELECT, CS_CLOCK_DIVIDER_1); //Set SMCLK = DCO with frequency divider of 1 CS_initClockSignal(CS_SMCLK,CS_DCOCLKDIV_SELECT,CS_CLOCK_DIVIDER_1); //Set MCLK = DCO with frequency divider of 1 CS_initClockSignal(CS_MCLK,CS_DCOCLKDIV_SELECT,CS_CLOCK_DIVIDER_1); Thanks Zoey for the input on what exactly failed, and thanks Hoang Anh for the answer explaining the solution. Greetings

Viewing all articles
Browse latest Browse all 233705

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>