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.

TMS320F2800137: Serial_Communication

Part Number: TMS320F2800137
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE, SFRA, DAC128S085

Dear Sir,

I have used serial communication ,here i used SYS_RX = GPIO35 & SYS_TX = GPIO37 .

Please find pic & How to resolved this error.

please resolved above error

  • Hi,

    It looks like GPIO-37 assigned to SCI_TX is already assigned to a different pin in some other module. You can inspect GPIO-37 in the board view in SysConfig to see the list of pins mapped to it and narrow down the conflict.

    Thanks,

    Arnav

  • Dear Amav,

    Thank you so much.

  • ear Amav,

    Please find below ,still error occur.

    **** Build of configuration HVAC_REV3P2_3SC_LIB for project tidm_02010_dmpfc_0013x ****
    
    "C:\\ti\\ccs1250\\ccs\\utils\\bin\\gmake" -k -j 4 all -O 
     
    Building target: "tidm_02010_dmpfc_0013x_pmsm.out"
    Invoking: C2000 Linker
    "C:/ti/ccs1250/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu1 -O2 --opt_for_speed=3 --fp_mode=relaxed --define=_INLINE --define=_FLASH --define=_F280013x --define=_PMSM_FAST_LIB --define=SYSCONFIG_EN --define=NEST_INT_ENABLE --define=DMCPFC_REV3P2 --define=PFC_DISABLE_N --define=MOTOR1_DISABLE_N --define=MOTOR2_DISABLE_N --define=ILPFC_DCH_EN --define=ILPFC_SWM_EN_N --define=SPPFC_CHA_EN_N --define=SPPFC_CHB_EN_N --define=MOTOR1_FAST --define=MOTOR1_ESMO_N --define=MOTOR2_FAST --define=MOTOR2_ESMO_N --define=MOTOR1_SSIPD_N --define=MOTOR1_MTPA_N --define=MOTOR1_FWC_N --define=MOTOR1_VIBCOMPA_N --define=MOTOR1_VIBCOMPT_N --define=DATALOGI4_EN_N --define=DATALOGF2_EN_N --define=DATALOG_PFC_N --define=DATALOG_MOTOR1_N --define=DATALOG_MOTOR2_N --define=DAC128S_ENABLE --define=DAC128S_SPIA --define=SFRA_ENABLE_N --define=CPUTIME_ENABLE --define=GPTEST_ENABLE_N --define=DEBUG_MONITOR_EN_N --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"tidm_02010_dmpfc_0013x_pmsm.map" --stack_size=0x100 --warn_sections -i"C:/ti/ccs1250/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/lib" -i"D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/sfra" -i"D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/observers/est_lib" -i"C:/ti/ccs1250/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/include" --reread_libs --define=SFRA_ENABLE_N --diag_wrap=off --display_error_number --xml_link_info="tidm_02010_dmpfc_0013x_linkInfo.xml" --entry_point=code_start --rom_model -o "tidm_02010_dmpfc_0013x_pmsm.out" "./sys_main.obj" "./libraries/control/DCL/c28/DCL_DF22_C1.obj" "./libraries/control/DCL/c28/DCL_PI_C4.obj" "./libraries/control/dclink_ss/dclink_ss.obj" "./libraries/control/mtpa/mtpa.obj" "./libraries/control/pi/pi.obj" "./libraries/control/vib_comp/vib_comp.obj" "./libraries/control/vs_freq/vs_freq.obj" "./libraries/dacs/dac128s085/dac128s085.obj" "./libraries/filter/filter_fo/filter_fo.obj" "./libraries/filter/filter_so/filter_so.obj" "./libraries/filter/notch/filter_notch.obj" "./libraries/filter/offset/offset.obj" "./libraries/observers/esmo/esmo.obj" "./libraries/observers/speedfr/speedfr.obj" "./libraries/observers/ssipd/ssipd.obj" "./libraries/sfra/sfra_gui.obj" "./libraries/sfra/sfra_gui_scicomms_driverlib.obj" "./libraries/transforms/clarke/clarke.obj" "./libraries/transforms/ipark/ipark.obj" "./libraries/transforms/park/park.obj" "./libraries/transforms/svgen/svgen.obj" "./libraries/transforms/svgen/svgen_current.obj" "./libraries/transforms/volts/volt_recons.obj" "./libraries/utilities/angle_gen/angle_gen.obj" "./libraries/utilities/cpu_time/cpu_time.obj" "./libraries/utilities/datalog/datalogIF.obj" "./libraries/utilities/traj/traj.obj" "./src_board/hal.obj" "./src_board/user_mtr1.obj" "./src_board/user_mtr2.obj" "./src_board/user_pfc.obj" "./src_control/motor1_drive.obj" "./src_control/motor2_drive.obj" "./src_control/motor_common.obj" "./src_control/pfc_ctrl.obj" "./src_device/device.obj" "./src_device/f280013x_codestartbranch.obj" "./src_device/f280013x_globalvariabledefs.obj" "./syscfg/board.obj" "./syscfg/c2000ware_libraries.obj" "./src_sys/communication.obj" "./src_sys/systemcontrol.obj" "./src_sys/systemdisplay.obj" "../libraries/observers/est_lib/fast_pmsm_lib.lib" "../libraries/sfra/sfra_f32_tmu_eabi.lib" "../src_device/driverlib.lib" "../src_device/f280013x_flash_lib.cmd" "../src_device/f280013x_headers_nonbios.cmd"  -lfast_pmsm_lib.lib -llibc.a 
    <Linking>
     
     undefined   first referenced
      symbol         in file     
     ---------   ----------------
     SYS_TX_init ./sys_main.obj  
     
    error #10234-D: unresolved symbols remain
     
    error #10010: errors encountered during linking; "tidm_02010_dmpfc_0013x_pmsm.out" not built
    >> Compilation failure
    makefile:241: recipe for target 'tidm_02010_dmpfc_0013x_pmsm.out' failed
    gmake[1]: *** [tidm_02010_dmpfc_0013x_pmsm.out] Error 1
    makefile:237: recipe for target 'all' failed
    gmake: *** [all] Error 2
    
    **** Build Finished ****
    

  • Hi,

    In sys_main, you might be missing the function prototype for SYS_TX_init, or the #include for the header file it is referenced from.

    Thanks,

    Arnav

  • Dear Amav,

    Thank you so much...

    as per above how to search SCI use interrupt in our code.

  • Hi,

    Can you clarify what you mean by search SCI use interrupt? The list of available interrupts can be viewed by clicking on the Error Interrupts & FIFO Interrupts dropdowns, if that is what you mean.

    Thanks,

    Arnav

  • Can you clarify what you mean by search SCI use interrupt?

    Yes

  • Dear Amav,

    How to use interrupt ??

    i have send command to mcu & check what command is received ??

    please guide..

  • Hi,

    You can refer to sci_ex2_loopback_interrupts in the SCI examples in C2000Ware for steps to set up SCI with interrupts. This example does not use Sysconfig, but a similar setup can be replicated with appropriate Sysconfig settings.

    Thanks,

    Arnav

  • This example does not use Sysconfig, but a similar setup can be replicated with appropriate Sysconfig settings.

    what parameter is mention in sysconfig settings??

    can you suggest sysconfig setting please??

  • HI Amav,

    Please suggest sysconfig setting??

  • Hi,

    You can see the SysConfig generated code by clicking on the "Show Generated files" button as shown below.

    Based on this, you can set up SysConfig settings required for your project. For more information on SCI interrupts, you can refer to the F2800137 TRM, as well as the SCI examples provided in C2000Ware.

    Thanks,

    Arnav

  • Dear Amav,

    Please check what's wrong??

    __interrupt void INT_SCI_COM_TX_ISR(void)
    {
    uint16_t i;

    SCI_writeCharArray(SCIA_BASE, sDataA, 2);

    //
    // Increment send data for next cycle
    //
    for(i = 0; i < 2; i++)
    {
    sDataA[i] = (sDataA[i] + 1) & 0x00FF;
    }

    SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_TXFF);

    //
    // Issue PIE ACK
    //
    Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
    }
    __interrupt void INT_SCI_COM_RX_ISR(void)
    {
    uint16_t i;

    SCI_readCharArray(SCIA_BASE, rDataA, 2);

    //
    // Check received data
    //
    for(i = 0; i < 2; i++)
    {
    if(rDataA[i] != ((rDataPointA + i) & 0x00FF))
    {
    error();
    }
    }

    rDataPointA = (rDataPointA + 1) & 0x00FF;

    SCI_clearOverflowStatus(SCIA_BASE);

    SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_RXFF);

    //
    // Issue PIE ack
    //
    Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
    }

    void initSCIAFIFO()
    {
    //
    // 8 char bits, 1 stop bit, no parity. Baud rate is 9600.
    //
    SCI_setConfig(SCIA_BASE, DEVICE_LSPCLK_FREQ, 9600, (SCI_CONFIG_WLEN_8 |
    SCI_CONFIG_STOP_ONE |
    SCI_CONFIG_PAR_NONE));
    SCI_enableModule(SCIA_BASE);
    SCI_enableLoopback(SCIA_BASE);
    SCI_resetChannels(SCIA_BASE);
    SCI_enableFIFO(SCIA_BASE);

    //
    // RX and TX FIFO Interrupts Enabled
    //
    SCI_enableInterrupt(SCIA_BASE, (SCI_INT_RXFF | SCI_INT_TXFF));
    SCI_disableInterrupt(SCIA_BASE, SCI_INT_RXERR);

    //
    // The transmit FIFO generates an interrupt when FIFO status
    // bits are less than or equal to 2 out of 16 words
    // The receive FIFO generates an interrupt when FIFO status
    // bits are greater than equal to 2 out of 16 words
    //
    SCI_setFIFOInterruptLevel(SCIA_BASE, SCI_FIFO_TX2, SCI_FIFO_RX2);
    SCI_performSoftwareReset(SCIA_BASE);

    SCI_resetTxFIFO(SCIA_BASE);
    SCI_resetRxFIFO(SCIA_BASE);
    }

  • Hi,

    What is the error you are facing? The code snippet looks alright

  • Dear Amav,

    Thank you so much for your big support.

    Issue resolved .

    Issue is in clock.

  • Dear Amav,

    while debuging my code then it can not go in isr routine of TX ??

    why ??

  • Hi,

    Can you place breakpoints in your ISR and see if the execution stops there?

  • Please explain below point...like use FIFO,Transmit interrupt 12/16 full,Receive interrupt 12/16 full.

    when i was untick onuse FIFO then one side communication not working properly i.e. Rx side.

    if i was tick on use FIFO then TX & RX work but other ISR not work.

    how to decide Receive interrupt 12/16?  12,13,14 ...etc

  • Hi,

    On using FIFO, the SCI transmitter and receiver use a 16-level deep First-In/First-Out buffer. Transmit Interrupt at 12/16 full means that the TX ISR will be triggered when the TX FIFO has less than or equal to 12 elements.

    If you don't use FIFO, the SCI essentially uses a 1-element deep buffer, and interrupts are generated accordingly. If you enable FIFO, you will need to choose the TX and RX levels depending on your expected application needs. For more details, kindly refer the Technical Reference Manual (TRM) linked above in the thread.

    Thanks,

    Arnav 

  • If you don't use FIFO, the SCI essentially uses a 1-element deep buffer, and interrupts are generated accordingly. If you enable FIFO, you will need to choose the TX and RX levels depending on your expected application needs.

    How to use 1-element deep buffer??

  • RX interrupt will occur when buffer has an element ready to be read. TX interrupt occurs when buffer is empty, i.e. ready to transmit another element.

    Thanks,

    Arnav

  • Dear Amav,

    My question can i use FIFO ??

    then what changed should do in SYSconfig or code for correct transmission & Received correct.

  • Dear Amav,

    If i can't use FIFO then my transmission & reception work properly.How ??

  • Yes, you can use FIFO. In the TX and RX ISRs, you will have to write/read the configured number of elements to avoid any overflow/underflow issues. If not using FIFO, then you can proceed with the same method, assuming number of elements as 1 for both.

    Thanks,

    Arnav

  • Dear Amav,

    How to set interrupt Priority ??

    if i set then this error occur?

    Description Resource Path Location Type
    #1965 cannot open source file "device_support\f280013x\common\include\sw_interrupt_prioritization_logic.h" sw_prioritized_isr_levels.h /tidm_02010_dmpfc_0013x/HVAC_REV3P2_3SC_LIB/syscfg line 323 C/C++ Problem

    >> Compilation failure
    src_device/subdir_rules.mk:44: recipe for target 'syscfg/sw_prioritized_defaultisr.obj' failed
    "syscfg\sw_prioritized_isr_levels.h", line 323: fatal error #1965: cannot open source file "device_support\f280013x\common\include\sw_interrupt_prioritization_logic.h"
    1 catastrophic error detected in the compilation of "syscfg/sw_prioritized_defaultisr.c".
    Compilation terminated.
    gmake: *** [syscfg/sw_prioritized_defaultisr.obj] Error 1
    Building file: "../sys_main.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1250/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu1 -O2 --opt_for_speed=3 --fp_mode=relaxed --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/control/pi" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/control/mtpa" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/control/vs_freq" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/control/vib_comp" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/control/dclink_ss" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/filter/filter_fo" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/filter/filter_so" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/filter/offset" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/filter/notch" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/observers/est_lib" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/observers/esmo" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/observers/speedfr" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/observers/ssipd" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/transforms/clarke" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/transforms/ipark" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/transforms/park" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/transforms/svgen" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/transforms/volts" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/utilities/angle_gen" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/utilities/cpu_time" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/utilities/datalog" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/utilities/traj" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/utilities/types/include" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/utilities/power_measurement" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/utilities/spll" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/sfra" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/dacs/dac128s085" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/libraries/control/DCL/c28" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/src_control" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/src_control/common/include" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/src_control/drivers/include" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/src_board" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/src_device" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/src_device/device_support/headers/include" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/src_device/driverlib" --include_path="C:/ti/ccs1250/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/include" --define=_INLINE --define=_FLASH --define=_F280013x --define=_PMSM_FAST_LIB --define=SYSCONFIG_EN --define=NEST_INT_ENABLE --define=DMCPFC_REV3P2 --define=PFC_DISABLE_N --define=MOTOR1_DISABLE_N --define=MOTOR2_DISABLE_N --define=ILPFC_DCH_EN --define=ILPFC_SWM_EN_N --define=SPPFC_CHA_EN_N --define=SPPFC_CHB_EN_N --define=MOTOR1_FAST --define=MOTOR1_ESMO_N --define=MOTOR2_FAST --define=MOTOR2_ESMO_N --define=MOTOR1_SSIPD_N --define=MOTOR1_MTPA_N --define=MOTOR1_FWC_N --define=MOTOR1_VIBCOMPA_N --define=MOTOR1_VIBCOMPT_N --define=DATALOGI4_EN_N --define=DATALOGF2_EN_N --define=DATALOG_PFC_N --define=DATALOG_MOTOR1_N --define=DATALOG_MOTOR2_N --define=DAC128S_ENABLE --define=DAC128S_SPIA --define=SFRA_ENABLE_N --define=CPUTIME_ENABLE --define=GPTEST_ENABLE_N --define=DEBUG_MONITOR_EN_N --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="sys_main.d_raw" --include_path="D:/ODU/FW/AC_ODU_Project_28022024/tidm_02010_dmpfc_0013x/HVAC_REV3P2_3SC_LIB/syscfg" --cmd_file="syscfg/board.opt" --cmd_file="syscfg/c2000ware_libraries.opt" "../sys_main.c"

    >> Compilation failure
    subdir_rules.mk:9: recipe for target 'sys_main.obj' failed
    "..\sw_prioritized_isr_levels.h", line 261: fatal error #1965: cannot open source file "sw_interrupt_prioritization_logic.h"
    1 catastrophic error detected in the compilation of "../sys_main.c".
    Compilation terminated.
    gmake: *** [sys_main.obj] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

  • Hi,

    Please ensure sw_interrupt_prioritization_logic.h is present at the required path.

  • Please ensure sw_interrupt_prioritization_logic.h is present at the required path.

    No.

    How to insert path Please provide procedure.

    For your reference please find below picture.

  • Hi,

    Since the thread has gotten quite long and the topic has diverged from the original one, kindly create a new E2E thread to address your queries on CCS Path issues and Interrupt Prioritization.

    Thanks,

    Arnav