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.

TMDX570LC43HDK: Problem facing while establishing communication between UART2 and UART3

Part Number: TMDX570LC43HDK
Other Parts Discussed in Thread: TMS570LC4357, HALCOGEN

Tool/software:

I am facing problem while establishing the communication between SCI3 and SCI2 peripherals in interrupt mode. The configuration is correct, because the code is working in TMS570LC4357 evaluation board. Please help me to resolve this problem. By observing the schematic I got to know that there are no resistors or capacitor's or IC's  in between respective micro controller pins and IO pins. Here is my code:

/** @file HL_sys_main.c
* @brief Application main file
* @date 11-Dec-2018
* @version 04.07.01
*
* This file contains an empty main function,
* which can be used for the application.
*/

/*
* Copyright (C) 2009-2018 Texas Instruments Incorporated - www.ti.com
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/


/* USER CODE BEGIN (0) */
/* USER CODE END */

/* Include Files */

#include "HL_sys_common.h"


/* USER CODE BEGIN (1) */
#include "HL_sys_core.h"
#include "HL_system.h"
#include "HL_sci.h"
#include "HL_gio.h"

#define UART1 (sciREG1)
#define UART2 (sciREG2)
#define UART3 (sciREG3)
#define UART4 (sciREG4)
/* USER CODE END */

/** @fn void main(void)
* @brief Application main function
* @note This function is empty by default.
*
* This function is called after startup.
* The user can use this function to implement the application.
*/

/* USER CODE BEGIN (2) */
uint8 u8uart1_temp = 0u;
uint8 u8uart1_buf[120] = {0u};
uint8 u8uart1_buf_size = 0u;

uint8 u8uart2_temp = 0u;
uint8 u8uart2_buf[120] = {0u};
uint8 u8uart2_buf_size = 0u;

uint8 u8uart3_temp = 0u;
uint8 u8uart3_buf[120] = {0u};
uint8 u8uart3_buf_size = 0u;

uint8 u8uart4_temp = 0u;
uint8 u8uart4_buf[120] = {0u};
uint8 u8uart4_buf_size = 0u;

void sciDisplayText(sciBASE_t *sci, uint8 *text,uint32 length);
void main(void);

/* USER CODE END */

void main(void)
{
/* USER CODE BEGIN (3) */
sciInit();
gioInit();
_enable_IRQ();
_enable_interrupt_();

sciEnableNotification((sciBASE_t *)UART1,(uint32)SCI_RX_INT);
sciReceive((sciBASE_t *)UART1,1U,(uint8*)&u8uart1_temp);

sciEnableNotification((sciBASE_t *)UART2,(uint32)SCI_RX_INT);
sciReceive((sciBASE_t *)UART2,1U,(uint8*)&u8uart2_temp);

sciEnableNotification((sciBASE_t *)UART3,(uint32)SCI_RX_INT);
sciReceive((sciBASE_t *)UART3,1U,(uint8*)&u8uart3_temp);

sciEnableNotification((sciBASE_t *)UART4,(uint32)SCI_RX_INT);
sciReceive((sciBASE_t *)UART4,1U,(uint8*)&u8uart4_temp);


while(1)
{

if(u8uart1_buf_size != 0u)
{
sciDisplayText((sciBASE_t*)(UART1),&u8uart1_buf[0],u8uart1_buf_size);
u8uart1_buf_size= 0u;

uint8 arr[3] = {0x01u,0x02u,0x03u};

sciDisplayText((sciBASE_t*)(UART2),&arr[3],1u);
sciDisplayText((sciBASE_t*)(UART3),&arr[2],1u);

}
else
{

}


if(u8uart2_buf_size != 0u)
{
sciDisplayText((sciBASE_t*)(UART1),&u8uart2_buf[0],u8uart2_buf_size);
u8uart2_buf_size= 0u;
}
else
{

}


if(u8uart3_buf_size != 0u)
{
sciDisplayText((sciBASE_t*)(UART1),&u8uart3_buf[0],u8uart3_buf_size);
u8uart3_buf_size= 0u;

}
else
{

}

if(u8uart4_buf_size != 0u)
{
sciDisplayText((sciBASE_t*)(UART4),&u8uart4_buf[0],u8uart4_buf_size);
u8uart4_buf_size= 0u;
}
else
{

}
}

/* USER CODE END */


}


/* USER CODE BEGIN (4) */
void sciNotification(sciBASE_t *sci, uint32 flags)
{
if((sci == (sciBASE_t *)UART1))
{
if(u8uart1_buf_size == 120u) /*Checking whether buffer has enough space to receive data or not . If not, reinitializing the byte offset to zero*/
{
u8uart1_buf_size = 0u;
}
else
{

}

sciReceive((sciBASE_t *)UART1, (uint32)1u, (uint8 *)&u8uart1_temp); /*receiving data through UART peripheral 3 through interrupt*/

u8uart1_buf[u8uart1_buf_size] = u8uart1_temp; /*Loading the received data into the buffer*/

u8uart1_buf_size++; /*Incrementing byte offset data to load next data */
}
else if((sci == (sciBASE_t *)UART2))
{
if(u8uart2_buf_size == 120u) /*Checking whether buffer has enough space to receive data or not . If not, reinitializing the byte offset to zero*/
{
u8uart2_buf_size = 0u;
}
else
{

}

sciReceive((sciBASE_t *)UART2, (uint32)1u, (uint8 *)&u8uart2_temp); /*receiving data through UART peripheral 3 through interrupt*/

u8uart2_buf[u8uart2_buf_size] = u8uart2_temp; /*Loading the received data into the buffer*/

u8uart2_buf_size++; /*Incrementing byte offset data to load next data */
}
else if((sci == (sciBASE_t *)UART3))
{
if(u8uart3_buf_size == 120u) /*Checking whether buffer has enough space to receive data or not . If not, reinitializing the byte offset to zero*/
{
u8uart3_buf_size = 0u;
}
else
{

}

sciReceive((sciBASE_t *)UART3, (uint32)1u, (uint8 *)&u8uart3_temp); /*receiving data through UART peripheral 3 through interrupt*/

u8uart3_buf[u8uart3_buf_size] = u8uart3_temp; /*Loading the received data into the buffer*/

u8uart3_buf_size++; /*Incrementing byte offset data to load next data */
}
else if((sci == (sciBASE_t *)UART4))
{
if(u8uart4_buf_size == 120u) /*Checking whether buffer has enough space to receive data or not . If not, reinitializing the byte offset to zero*/
{
u8uart4_buf_size = 0u;
}
else
{

}

sciReceive((sciBASE_t *)UART4, (uint32)1u, (uint8 *)&u8uart4_temp); /*receiving data through UART peripheral 4 through interrupt*/

u8uart4_buf[u8uart4_buf_size] = u8uart4_temp; /*Loading the received data into the buffer*/

u8uart4_buf_size++; /*Incrementing byte offset data to load next data */
}
else
{

}

}

void sciDisplayText(sciBASE_t *sci, uint8 *text,uint32 length) /*Function to send UART data*/
{
while(length--)
{
while ((sci->FLR & 0x4u) == 4u); /* wait until busy */
sciSendByte(sci,*text); /* send out text */
text++;
};
}

/* USER CODE END */