Part Number: LAUNCHXL2-570LC43
Other Parts Discussed in Thread: HALCOGEN
Tool/software: Code Composer Studio
Hello community,
I have copied the example for LIN_DIGITAL_LOOPBACK provided by the HALCoGen for TMS570LC43x and compiled with ZERO Error. But I am not seeing any output Why is that? I am attaching the code below
/* USER CODE BEGIN (0) */
#include "HL_lin.h"
/* USER CODE END */
/* Include Files */
#include "HL_sys_common.h"
#include "HL_system.h"
/* USER CODE BEGIN (1) */
/* 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) */
#define TSIZE1 8
uint8 TEXT1[TSIZE1]= {'H','E','R','C','U','L','E','S'};
#define TSIZE2 10
uint8 TEXT2[TSIZE2]= {0};
#define TSIZE3 19
uint8 TEXT3[TSIZE3]= {'T','E','X','A','S',' ','I','N','S','T','R','U','M','E','N','T','S','\n','\r'};
/* USER CODE END */
void main(void)
{
/* USER CODE BEGIN (3) */
/* Set length of data response in bytes (7 implies 8 bytes */
linSetLength(linREG1, 7);
linInit();
linEnableLoopback(linREG1,Digital_Lbk);
/* Checking that Tx is ready and also if the LIN bus is free (Checking BUSY flag) */
while((!(linIsTxReady(linREG1))) || (linREG1->FLR & 0x8U == 0x8U));
/*Send lin header including sync break field, sync field and identifier. */
linSendHeader(linREG1, 0x28);
/*Send data TEXT1 */
linSend(linREG1,&TEXT1[0]);
/* Checking if Rx is ready. */
while((linREG1->FLR & LIN_RX_INT) == 0U);
/*Data is read from RD register and stored in TEXT2. */
linGetData(linREG1, TEXT2);
while(1);
/* USER CODE END */
}
/* USER CODE BEGIN (4) */
/* USER CODE END */