1711413_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

1711413_en-US

1711413_en-US

MPC5744p S32DS LINBUS master slave example

Hello everyone,

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

Thank you!

Re: MPC5744p S32DS LINBUS master slave example

The attached ZIP contains the modified driver files 

Tested configuration:
- MPC5744P
- S32 Design Studio for Power Architecture 2.1
- S32_SDK_S32PA_RTM_3.0.3
- INST_LINFLEXD_UART2
- FreeRTOS
- Two physical slave controllers

Implemented functionality:
- LIN break and 0x55 synchronization byte
- Protected identifier generation and validation
- Master header transmission
- Interrupt-driven slave response
- Classic and enhanced checksum
- Frames with up to 8 data bytes
- Response timeout handling
- Recovery after a slave is disconnected, reset or reconnected
- Polling of multiple slave identifiers

The driver was tested with two physical MPC5744P slave controllers.

Installation:
1. Back up the original SDK driver files.
2. Copy the provided header to:
platform/drivers/inc/
3. Copy the provided source file to:
platform/drivers/src/linflexd/
4. Refresh the linked SDK files in the project.
5. Perform a clean rebuild.

I hope this helps anyone who needs basic LIN communication with the S32 SDK.
Feedback and test results on other MPC5xxx devices are welcome.

Best regards

Re: MPC5744p S32DS LINBUS master slave example
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);
 
Re: MPC5744p S32DS LINBUS master slave example

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

Re: MPC5744p S32DS LINBUS master slave example

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?

Re: MPC5744p S32DS LINBUS master slave example

Hi,

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

BR, Petr

Re: MPC5744p S32DS LINBUS master slave example

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?

Re: MPC5744p S32DS LINBUS master slave exampleThank 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?Re: MPC5744p S32DS LINBUS master slave example

Hi,

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

PetrS_0-1692959754415.pngPetrS_0-1692959754415.pngPetrS_0-1692959754415.png

BR, Petr

タグ(1)
評価なし
バージョン履歴
最終更新日:
土曜日
更新者: