MPC5744p S32DS LINBUS master slave example

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MPC5744p S32DS LINBUS master slave example

2,603 次查看
akovacevic
Contributor I

Hello everyone,

Could someone help me with information about whether there is an MPC5744p LINBUS Master/Slave example for S32 Design Studio?

Thank you!

0 项奖励
回复
7 回复数

2,593 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

there are LIN master and slave examples within S32DS, so you can refer to it.

PetrS_0-1692959754415.png

BR, Petr

0 项奖励
回复

2,557 次查看
akovacevic
Contributor I

What is the best approach here to use the SDK and LIN bus? I tried generating a LIN message with linflexd_uart, but generating that break and wakeup isn't possible. Should I use TX as a digital output?

0 项奖励
回复

2,504 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

as far as I know there's no LIN support in the SDK and there are no plans to add it.

BR, Petr

0 项奖励
回复

2,497 次查看
akovacevic
Contributor I

My idea is to stay in the SDK environment, which is now, in your opinion, the best way to enable LIN hardware? Or is there maybe a way to create software via PIT and GPIO?

0 项奖励
回复

2,480 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you can stay with SDK and LINFlex module, but you need to write code/driver yourself, for example reusing available baremetal code. 

BR, Petr

0 项奖励
回复

1,788 次查看
akovacevic
Contributor I
here is a way that works and simulates a wakeup signal
 
#define SYNC 0x55
#define WAKEUP = 0x00;
   ....
    LINFLEXD_UART_DRV_SetBaudRate(INST_LINFLEXD_UART1,4800);
    LINFLEXD_UART_DRV_SendDataBlocking(INST_LINFLEXD_UART1, &WAKEUP, 1,100);
    LINFLEXD_UART_DRV_SetBaudRate(INST_LINFLEXD_UART1,9600);
    masterMessage.sync = SYNC;
    masterMessage.id = PID;
    masterMessage.data[0] = 0x00;
    masterMessage.data[1] = 0x00;
    masterMessage.chksum = linbus_calculate_checksum(masterMessage.data,2);
 
0 项奖励
回复

2,565 次查看
akovacevic
Contributor I
Thank you for quick replay, is it possible to integrate a part of the example (initialization and sending a LIN message) with, let's say, a FreeRTOS example from the SDK package without any major issues?
0 项奖励
回复