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.

[FAQ] CCS/EVM430-F6779: How to change the default baud rate generated by EMDC?

Part Number: EVM430-F6779
Other Parts Discussed in Thread: MSP430F6779, , MSP430I2040, MSP-EXP430F5529LP, MSP-ISO

Tool/software: Code Composer Studio

Hello,


We aim to deploy the code as it generated by EMDC on to MSP430F6779 EVM.

We would like to change the default baud rate from 250K to 115200.

if we change code that is generated by EMDC to change baud rate. Would the EMDC software work with 115200 baud rate. reason we what to do that is because the device we would like to use does not support 250K baud rate.

How to change the default baud rate generated by EMDC? for that which file or register i have to modify

I am very new to TI controllers . So pls provide me detailed explanation

  • Hello,

    applied automation said:
    We aim to deploy the code as it generated by EMDC on to MSP430F6779 EVM.

    Thanks for your interest in using the Energy Measurement Design Center, or EMDC.

    applied automation said:

    We would like to change the default baud rate from 250K to 115200.

    if we change code that is generated by EMDC to change baud rate. Would the EMDC software work with 115200 baud rate. reason we what to do that is because the device we would like to use does not support 250K baud rate.

    The 250k baud rate ensures a poly-phase configuration with all results selected could transmit the data between samples. The EMDC-generated code can be modified to change the baud rate, but since the EMDC GUI is set to 250k baud and can't be changed, the GUI can't be used to calibrate the system or view results. However, a host MCU can be used instead.

    applied automation said:

    How to change the default baud rate generated by EMDC? for that which file or register i have to modify

    I am very new to TI controllers . So pls provide me detailed explanation

    You should be able to change the baud rate in the 'uart_defs.h' file located under your CCS project > DesignCenter > comm > drivers folder. The baud rate depends on the selected SMCLK frequency and can be changed by modifying the PRESCALER, FIRST_STAGE_MOD and SECOND_STAGE_MOD defines.

    //*****************************************************************************
    //
    //! def UART__SAMPLING_MODE defines the eUSCI_A LF or HF mode.
    //
    //! def UART__PRESCALER defines the eUSCI_A pre-scaler.
    //
    //! def UART__FIRST_STAGE_MOD defines the eUSCI_A first stage modulation.
    //
    //! def UART__SECOND_STAGE_MOD defines the eUSCI_A second stage modulation.
    //
    //*****************************************************************************
    #define UART__SAMPLING_MODE	   (EUSCI_A_UART_OVERSAMPLING_BAUDRATE_GENERATION)
    
    
    #if (EM_SMCLK_FREQ_IN_HZ == 25165824)
    
    //250K Baud Rate @ 25MHz	
    #define UART__PRESCALER                                                  (0x06)
    #define UART__FIRST_STAGE_MOD                                            (0x03)
    #define UART__SECOND_STAGE_MOD                                           (0x02)
    
    #elif (EM_SMCLK_FREQ_IN_HZ == 16777216)
    
    //250K Baud Rate @ 16MHz	
    #define UART__PRESCALER                                                  (0x04)
    #define UART__FIRST_STAGE_MOD                                            (0x03)
    #define UART__SECOND_STAGE_MOD                                           (0x00)
    	
    #elif (EM_SMCLK_FREQ_IN_HZ == 8388608)
    
    //250K Baud Rate @ 8MHz	
    #define UART__PRESCALER                                                  (0x02)
    #define UART__FIRST_STAGE_MOD                                            (0x01)
    #define UART__SECOND_STAGE_MOD                                           (0x02)
    	
    #else
    
    #error "SMCLK frequency not supported by the UART driver"
    
    #endif

    Please take some time and read through the following two threads. They are similar questions and will provide helpful insights.

    MSP430i2040: Interfacing EMDC with another MCU over UART

    [FAQ] MSP430F6779: Interfacing EMDC with another MCU over UART

    Regards,

    James

  • Hi James,

    Thank you so much for your quick reply.This is a great help to me.

    //115200 Baud Rate @ 25MHz
    #define UART__PRESCALER                      (0x0D)
    #define UART__FIRST_STAGE_MOD         (0x0A)
    #define UART__SECOND_STAGE_MOD    (0x00)

    Is this changes are enough to communicate @115200 baudrate or any further modification req

    If we decrease the baud rate, we must need to decrease the data size or sort code structure?

  • Hi James,

    I want to use the EMDC GUI to configure the MSP430F6779 and then interface MSP430F6779 with PIC Microcontroller.

    We are trying to achieve the following.

    Design energy measurement solution using ENERGY Measurement Design Center (EMDC) GUI.
    Generate code and deploy it as is (no code changes at all) using JTAG into EVM430-F6779.
    Connect PIC Microcontroller ( lets call it Host) via UART.
    Read meteorology values from EVM430-F6779 to host MCU. Is it possible ?

    We would like to change the default baud rate from 250K to 115200 or 9600,because the host device we would like to use does not support 250K baud rate

    we plan to use UART and the same protocol, then we need to make minor changes - such as slowing down the baud rate to 9600.
    No change in generated code except the UART baud rate from 250kbaud to 9600.

    slowing down the baud rate to 9600,that low baud rate may impact our software process or May send wrong data or just can't work ?

  • Hi James,


    Using the GUI for calibration should save you time over implementing the calibration process and algorithm on the MCUs. You could do this using a single EMDC project. First, you'd take this project and generate the EMDC code, which you'd use to program all devices to get started. To calibrate the system, you'd just connect to the EMDC GUI, perform the calibration (gain and phase) using accurate test equipment and GUI, and then choose to save those calibration factors to the INFO memory of the device. Then, assuming your 9600 baud rate firmware hasn't been changed (outside of the baud rate), the calibration factors shouldn't get overwritten when this firmware is programmed. Then, it can load the new calibration factors and use those.

    I read this in the following thread which is you referred to me : MSP430i2040: Interfacing EMDC with another MCU over UART in this thread

    So after calibration using GUI and then choose to save those calibration factors to the INFO memory of the device. Then if i changing baud rate to 9600 and re-flash this code into EVM , during this re-flash firmware the calibration factors will get replaced or the meter must be recalibrated again ?
  • applied automation said:
    I read this in the following thread which is you referred to me : MSP430i2040: Interfacing EMDC with another MCU over UART in this thread

    Thanks for reading through this!

    applied automation said:
    So after calibration using GUI and then choose to save those calibration factors to the INFO memory of the device. Then if i changing baud rate to 9600 and re-flash this code into EVM , during this re-flash firmware the calibration factors will get replaced or the meter must be recalibrated again ?

    This should be possible as long as you choose NOT to re-write INFO memory in CCS when you reprogram the device with the lower baud rate code.

    Regards,

    James

  • Hi James,

    Thanks for your quick response.

    we plan to use UART and the same protocol, then we need to make minor changes - such as slowing down the baud rate to 9600 or 115200.
    No change in generated code except the UART baud rate from 250kbaud to 9600.

    slowing down the baud rate to 9600,that lower baud rate may impact our software process or May send wrong data or just can't work ?

  • applied automation said:
    we plan to use UART and the same protocol, then we need to make minor changes - such as slowing down the baud rate to 9600 or 115200.
    No change in generated code except the UART baud rate from 250kbaud to 9600.

    You shouldn't have an issue using a baud rate of 115200. For a three-phase configuration, 9600 may be too slow to transmit all the data between ADC samples. If the baud rate is too slow, the sampling and calculations could overrun the data transmission.

    Hope this helps!

    Regards,

    James

  • Hi,

    How do i connect EVM430-F6779 to serial port terminal? Shall i use ON BOARD RS232 interface or MSP430F5529 LaunchPad ?

  • Hello,

    Currently, EMDC does not support the on-board RS-232 connector. Instead, you can use the MSP-EXP430F5529LP (USB HID bridge), MSP-ISO (isolation) and some jumper wires to connect your PC to the UART RX_EN and TX_EN headers beside the RS-232 connector on the EVM430-F6779.

    You can read more about this in the EMDC Technology Guide > Introduction > Dependencies and also EMDC Technology Guide > Design Center GUI > Out-of-Box Experience sections. I'd highly recommend that you read through these and other related sections. For making the communication connections, refer to EMDC Technology Guide > Design Center GUI > Out-of-Box Experience > Make the Hardware Connections > Communication.

    Please let me know if you have any questions!

    Regards,

    James

  • Hello,

    After importing EMDC generated Source code into CCS v8, click the debugger icon to build and download the code to the target. Then start the code by clicking the run button. Then click stop debugging and power cycle the target. why don't we use release mode instead of debugger icon to build and download the code to the target? How can we download the firmware without entering into debugger ?

  • Hi James,

    After importing EMDC generated code in CCS v8 how to upload that code into EVM430-F6779 ? I don,t want to debug . I just want to fuse it with RELEASE MODE.

    Plz reply me as soon as possible.

  • Hello,

    I've addressed your question in your other post linked below. Since this thread was related to changing the EMDC baud rate, please mark this resolved if your question has been resolved. Thanks.

    MSP430F67791A: IAR Hex loader

    Regards,

    James

**Attention** This is a public forum