Hello Community,
I am currently working with the S32K344MINI-EVB (FRDM Automotive Evaluation Board) and would like to gain hands-on experience with basic peripheral drivers before starting development on a custom project based on the NXP S32K3 family.
I successfully imported and ran the following example projects:
For both AUTOSAR and Non-AUTOSAR configurations, the projects built successfully and produced the expected output on the S32K344MINI-EVB.
I then imported the following CAN example projects:
While configuring and building these projects, I encountered the errors shown in the attached screenshot.
Could anyone please advise:
The attached screenshot shows the errors encountered during configuration/build.
Thank you for your support.
Regards,
Veer
Hello @Veereshh,
Pinout is fairly similar between S32K344 EVB and FRDM-A-S32K344 (formerly S32K344MINI).
1. No
2. Yes. Both FlexCAN_IP_Example_S32K344 & Can_Example_S32K344 projects only configure FlexCAN in "loopback" mode, meaning there are no pins configured, and FlexCAN_0 is listening to its own messages.
Inside the project's MEX, you must:
FRDM-A-S32K344 also uses TJA1043 CAN transceiver, which must set CAN_EN & CAN_STB to HIGH in order to set the transceiver in normal operation. These are routed to PTC21 & PTC20, as stated in the FRDM's user manual:
These must be set to HIGH inside your project as well. You can use the following examples as reference: [RTD600 MCAL & IP] S32K3X4EVB-T172 FlexCAN Example Interrupt/Polling.
Keep in mind they are based on RTD 6.0.0, not RTD 4.0.0.
After setting this, you can use J15.1 CANH and J15.2 CANL connected to another CAN node (PCAN USB analyzer, another MCU, etc.) to test CAN communication. In the examples I've shared, PCAN-USB analyzer was used.
Best regards,
Julián
Hello
I'm glad the information has been helpful.
In order to operate FlexCAN through interrupts, you must install the interrupt handler:
Also, the error you are seeing is because when FlexCAN driver uses Polling mode, you must specify the CanMainFunctionRWPeriods for both read and write calls. If Interrupt mode is used, this container must be removed from "CanHardwareObjetc > Can MainFunction RW Period Reference"
Best regards,
Julián
Hi Julian,
Thank you for your support. Your guidance helped me successfully resolve the original configuration issues and build the CAN example. I have shared the build steps and screenshots below for the benefit of other users facing the same issue.
I have one additional question. After successfully running the Loopback example, I configured CAN_EN (PTC21) and CAN_STB (PTC20) and then modified the CAN configuration as follows:
After these changes, validation/build errors are generated.
Could you please advise if any additional FlexCAN, IntCtrl_Ip, NVIC, or RTD-specific settings are required when switching from Polling to Interrupt mode?
Thank you again for your continued support.
Best regards,
Veer