LLCE CAN Gateway DEMO Fails on Tx and Rx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LLCE CAN Gateway DEMO Fails on Tx and Rx

1,386 Views
domenicoperroni
Contributor I

Hi,

I just replicated the LLCE gateway DEMO using the S32DS for the Miriac SoM MPX-S32G274A and SBC-S32G274A board. From a theoretical point of view the configuration should be the same although this is not the reference board. However, during execution, CAN Tx and Rx simply fail  because no CAN message could be displayed on the bus.

Specifically, by debugging the code I found an issue in the function

StatusType Check_Status(Can_PduType *CanMessage)

due to the TP_TIMEOUT expiring in the while reported as follows

 /* Wait for transmission and reception */
    while ( (( (Can_TxConfirmation - last_TxConfirmation) < 1) || ( (Can_RxIndication - last_RxIndication) < 1))  && (can_counter < TP_TIMEOUT) )
    {
        can_counter++;
    }

I also tried flashing the BLOB image and loading from U-Boot but the result was the same: Tx and Rx didn't work.

Please, can anyone help me?

Thanks.

- Domenico

0 Kudos
2 Replies

1,357 Views
domenicoperroni
Contributor I

Thanks you for you answer, below few more details to share;

I tried with the below examples:

1)MIGRATE LLCE_CAN/LIN(MCAL DRIVER) TO S32DS 3.4.pdf -> with this one using the S32DS and S32Debugger I was able to enter debug mode, put some breakpoints and look in depth. Firmware loading for the 4 M0+ returned no error, even the can transmit and receive don't show any misbehaviour apparently, but I'm not expert with this LLCE firmware. The status of the LLCE driver before sending and transmit is properly set to "READY".

2)TP-LLCE-CAN-CAN-FD-AND-LIN-SUPPORT-S32G-VNP-RDB2.pdf -> Here simply we followed the tutorial step-by-step and the final behaviour was basically the same, no compile errors, we've been able to upload the blob image and execute it, honestly without direct integration with S32DS I don't know how to debug the software at runtime, any suggestion?

Please note that LLCE integration with Yocto Linux using the 4 binaries for the M0+ provided by NPX do worked(all CAN interfaces are accessible and usable via Linux/SocketCAN). This probably means the HW integration shall be the same mostly because the HW provider confirmed it and basic settings you mentioned should be identical. But let's suppose something is different, how LLCE driver can be customized to adapt eventually pinmuxing options, clocking, PHY models and external bus/connectors? Are these part of the 4 binaries configuration or with EB tresos is it possible to configure the stack.

Many Thanks,

Domenico

0 Kudos

1,373 Views
bpe
NXP Employee
NXP Employee

It is not clear what exactly demo you are trying to run. There are multiple
CAN demos in the baseline LLCE Firmware and Driver package. Besides that,
none of the boards you mentioned are directly supported by the demos.
Third party boards may differ in pinmuxing options, clocking, PHY models
and external bus/connectors. The main suggestion therefore is, contact your
hardware manufacturer for suggestions on the necessary modifications to the
original NXP code and/or ready customized demos. As of the symptoms you
described, they only indicate that transfer over the CAN fails in general.
You have to step deeper into the transmit and receive procedures to see
what operation exactly fails and why.

 

Best Regards,
Platon

 

0 Kudos