Hello,
I'm trying to receive a CAN message on S32K396-BGA-DC1 Evaluation Board.
I successfully ran the s32k37x_s32k39x_can_transmit_ebt example, so I can receive CAN message from the board. Thus, i guess that my hardware setup is correct.
However, running the s32k37x_s32k39x_can_receive_s32ct example, D33 LED does not turn on when I send a message to the board.
I'm using two Peak PCAN USB adapters, the frame from the board is received by both my PCANs.
The frame i'm sending is from a PCAN is seen by the other PCAN but not by the board.
I did check configuration
Rx/Tx pins are set as in the board user guide (PTC23: Rx / PTC21 : Tx)
Controller is not in loopback mode
I have some CanHardwareObjects set as receiver with Id filtering disabled (Filter mask 0 = accept all frames)
Can someone help with this ?
Thank you
Best regards
Vincent
解決済! 解決策の投稿を見る。
Could you please try and send frames with EXTENDED Id option enabled inside your Can analyzer software and let us know if this works?
From what I am noticing from the configuration project, all the Receive hardware objects are configured with Can ID Message Type set as EXTENDED. For being also to also receive STANDARD frames, you should change the option to STANDARD.
For more details on this topic, could you please consult the following thread? A detailed explanation on the hardware objects, EXTENDED/STANDARD frame types, and the available options, is provided in this thread, which you might find helpful. https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K312-CAN-configuration/m-p/2044459#M...
Hope this helps,
Irina
I have tried it on my own setup, and I managed to receive CAN messages from my CAN analyzer. Could you please check if you have selected the BGA-DC1 configuration in your model, like illustrated below?
The reason why the LED is not blinking could be related to the fact that, on the BGA-DC1, the pin routed to the D33 BLUE LED is different than the one configured in the default configuration project that we provide for the S32K396 processor.
Changing the Configuration Project Template to address the DC1 board might solve the issue you are currently encountering.
Please let us know if this helps,
Irina
Hi Irina,
Thanks for your help.
I confirm that i'm using the same Configuration Project Template
By the way, the s32k37x_s32k39x_can_transmit_ebt model example is also toggling D33 LED on frame transmission event.
Using the same config template with this model, i can see the LED going on and off and the message is transmitted
To dig a bit further, i have exported the model source code to S32 Design Studio and run the code in debug
It appears that the code never enter in the "CanIf_RxIndication" function (the function setting the LED), like if the interrupt never is never fired.
Call hierarchy of "CanIf_RxIndication" brings me to "Can_43_FLEXCAN_MainFunction_Read" in which we never enter either, explaining why interrupt is never fired
In fact, at any time I stop the code, we are in
while (runModel) {
}
Thanks
Vincent
Could you please try and send frames with EXTENDED Id option enabled inside your Can analyzer software and let us know if this works?
From what I am noticing from the configuration project, all the Receive hardware objects are configured with Can ID Message Type set as EXTENDED. For being also to also receive STANDARD frames, you should change the option to STANDARD.
For more details on this topic, could you please consult the following thread? A detailed explanation on the hardware objects, EXTENDED/STANDARD frame types, and the available options, is provided in this thread, which you might find helpful. https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K312-CAN-configuration/m-p/2044459#M...
Hope this helps,
Irina
Hello @Vincent_91687
MBDT integrates the RTD (Real-Time Drivers) for configuration and access to the hardware (peripherals, pins, clocks, interrupts). For more details on configuration parameters, and functions implemented by our blocks, you could check the RTD User Manual for the component you would like to use, and also the AUTOSAR driver standard (RTD MCAL layer is AUTOSAR compatible).
For CAN, and other blocks as well, you could access this documentation I am referring to by clicking on the Help button of the Simulink block, and navigating to the Code Generation section, like illustrated below.
For configuration examples, you could check the configuration projects that we are delivering together with our application examples.
Moreover, in case of the ADC, PWM, CAN, UART and DIO, we have also put together some articles on our MBDT NXP Community, that provide a more detailed insight into the available parameters, and settings. Maybe you would find them useful as well. Here is the link to the CAN one, but the others are available under the Beginner's Guide for Model-Based Design Toolbox section on our main page.
Hope this helps you. Please let us know in case additional information is required.
Thanks,
Irina
Hi@Vincent_91687
Can you provide us with this routine:s32k37x_s32k39x_can_receive_s32ct
(I'm sorry I don't know if we have such a routine), I will take the time to check it for you.