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.

CCS/TMS570LS0432: How to send a UART message to PL455a

Part Number: TMS570LS0432
Other Parts Discussed in Thread: BQ76PL455A,

Tool/software: Code Composer Studio

Hello,

I'm trying to send a message from my TMS570LS0432 Launchpad to the bq76pl455a.

In the CCS Example code there are several lines where the variable "nSent"is used.

But i cant understand how it's send via the UART.

An example:

void main(void)
{
/* USER CODE BEGIN (3) */
	systemInit();
	gioInit();
	sciInit();
	sciSetBaudrate(scilinREG, BAUDRATE);
	rtiInit();
	vimInit();

	_enable_IRQ();

	WakePL455();

	CommClear();

	CommReset();

	// initialize local variables
	int nSent, nRead, nTopFound = 0;
	int nDev_ID, nGrp_ID;
	BYTE  bFrame[132];
	uint32  wTemp = 0;

	/** Code examples
	 * The command sequences below are examples of the message examples in the bq76PL455 Communication Examples document.
	 * each message example references the section in the document.
	 */

	// Wake all devices
	// The wake tone will awaken any device that is already in shutdown and the pwrdown will shutdown any device
	// that is already awake. The least number of times to sequence wake and pwrdown will be half the number of
	// boards to cover the worst case combination of boards already awake or shutdown.
	for(nDev_ID = 0; nDev_ID < TOTALBOARDS>>1; nDev_ID++) {
		nSent = WriteReg(nDev_ID, 12, 0x40, 1, FRMWRT_ALL_NR);	// send out broadcast pwrdown command
		delayms(5); //~5ms
		WakePL455();
		delayms(5); //~5ms
	}

	// Mask Customer Checksum Fault bit
	nSent = WriteReg(0, 107, 0x8000, 2, FRMWRT_ALL_NR); // clear all fault summary flags

	// Clear all faults
	nSent = WriteReg(0, 82, 0xFFC0, 2, FRMWRT_ALL_NR);		// clear all fault summary flags
	nSent = WriteReg(0, 81, 0x38, 1, FRMWRT_ALL_NR); // clear fault flags in the system status register