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.

TMS320F28379D: 9

Part Number: TMS320F28379D

Tool/software:

Greetins,

we are using it's TMS320F28379D board and everything is working fine. we are using TMS as hardware controller and from there we are sending some data using uart to hmi and from hmi we are getting data back (receiving) using uart communication, now the thing is what if:

to take the control card out and use it like this:


TMS320F28075PZPT

flashing and everything is working we have done pin connection also right but the only thing is when we tried to do communication using uart it is not happning.

I hava checked:

SCIB :


GPIO14_EPWM8A_SCITXDB_MCLKXB_OUTPUTXBAR3  -> RXB 

GPIO15_EPWM8B_SCIRXDB_MFSXB_OUTPUTXBAR4  -> TXB

SCIA :


GPIO42_SDAA_SCITXDA_USB0DM -> TXA

GPIO43_SCLA_SCIRXDA_USB0DP -> RXA


USED CODE:

this code is working on the TMS320F28379D properly but on the TMS320F28075PZPT board, it is not working we have checked pin connections which is ok. but it is still not working, The code is flashing but data is not sending.

we use both pin connections and modify the code accordingly (SCIA & SCIB) on this working code, the current code is for SCIA.

#include "driverlib.h"
#include "device.h"
#include <stdio.h> // check -2 for both bi-directinal communication

#define BAUD_RATE 115200

volatile int received_value = 0; // Stores received data
volatile int send_value = 5; // Test value to send (ASCII 'A')

void initSCIB(void);
void configureUART(void);
void sendUARTData(uint16_t data);

void main(void)
{
Device_init();
DEVICE_DELAY_US(1000000);
Device_initGPIO();

// Configure GPIO19 for UART Receive (RX)
GPIO_setPadConfig(43, GPIO_PIN_TYPE_PULLUP);
GPIO_setPinConfig(GPIO_43_SCIRXDA);
GPIO_setQualificationMode(43, GPIO_QUAL_ASYNC);

// Configure GPIO18 for UART Transmit (TX)
GPIO_setPadConfig(42, GPIO_PIN_TYPE_STD);
GPIO_setPinConfig(GPIO_42_SCITXDA);

initSCIB();
configureUART();

while(1)
{
// Send data every 1 second
sendUARTData(send_value);
DEVICE_DELAY_US(1000000);

// Check if data is available in receive FIFO
if (SCI_getRxFIFOStatus(SCIA_BASE) != SCI_FIFO_RX0)
{
received_value = SCI_readCharBlockingFIFO(SCIA_BASE); // Read received data
}
}
}

void initSCIB(void)
{
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SCIB);
SCI_performSoftwareReset(SCIA_BASE);
SCI_resetChannels(SCIA_BASE);
SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_TXFF | SCI_INT_RXFF);
SCI_resetRxFIFO(SCIA_BASE);
SCI_enableFIFO(SCIA_BASE);

SCI_setConfig(SCIA_BASE, DEVICE_LSPCLK_FREQ, BAUD_RATE,
(SCI_CONFIG_WLEN_8 | SCI_CONFIG_STOP_ONE | SCI_CONFIG_PAR_NONE));

SCI_enableModule(SCIA_BASE);
SCI_performSoftwareReset(SCIA_BASE);
DEVICE_DELAY_US(1000);
}

void configureUART(void)
{
SCI_setFIFOInterruptLevel(SCIA_BASE, SCI_FIFO_TX1, SCI_FIFO_RX1);
SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_RXFF);
SCI_enableFIFO(SCIA_BASE);
}

void sendUARTData(uint16_t data)
{
while (SCI_getTxFIFOStatus(SCIA_BASE) == SCI_FIFO_TX16); // Wait if FIFO is full
SCI_writeCharBlockingFIFO(SCIA_BASE, data); // Transmit data
}

For our expected output is there any modification that needs to be done, ether in code or on connections.