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.
Tool/software:
Tool/software: Code Composer Studio
Hi,
i have a question regarding LIN Driver
When I call the linSend()
function, the data is not transmitted, but it is stored correctly in the buffer. Below.
I have added my code
#include "sys_common.h"
#include "lin.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 DELAY_TIME 500000
uint8_t tx_data[8]={0x00,0x01,0x12,0x13,0x14,0x15,0x16,0x17};
void delay_func(uint32_t delay)
{
while (delay != 0)
{
delay--;
}
}
/* USER CODE END */
int main(void)
{
/* USER CODE BEGIN (3) */
/* USER CODE END */
linInit();
while(1)
{
linSendHeader(linREG,0x3C);
linSetLength(linREG,8);
linSend(linREG,&tx_data[0]);
delay_func(DELAY_TIME);
}
return 0;
}
Hi Priya,
the data is not transmitted, but it is stored correctly in the buffer.
I don't understand, how you are saying that data is not transmitted? Did you connect any logic analyzer parallelly to LIN line?
You can also refer below thread once:
--
Thanks & regards,
Jagadish.