We are using the below RTD version in our existing project.
NXP RTD AUTOSAR 4.7. Build version: S32K1_RTD_2_0_0_D2308_ASR_REL_4_7_REV_0000_20230804
We have requirement to pass a message from one CAN channel to other CAN channel as per below image without do any processing or decoding of the message. We observed maximum of 500us time delay between passing the data from one channel to other (we are handling it in interrupt based). Is there a way to reduce this delay? Or is there any specific buffer mechanism implement in RTD to take this much time. Current we are facing problem that, some of the data are not passed to CAN2 as we are getting continuous data input from CAN0. This particular behaviour is not observed when we used the SDK (RTM 3.0.2)
Controller that we're using is S32K148
And Also I've attached CAN configuration
please let me know if you need any other informations from my end
To assist in debugging, we will be sharing the following:
Hi@AdithhyJayaram1996
Can you provide a project that can reproduce the problem, or a method and steps that can allow us to reproduce your problem, so that we can give some reasonable suggestions.
We are currently facing a persistent timeout issue while flashing the HALO application using UDS Transfer Data in our C Sample software, which is based on RTD 4.4 and free-rtos(10.0.) The same flashing process works fine on the B Sample software, which was based on NXP SDK and free-rtos. We would appreciate your help in diagnosing and resolving this issue.
CAN Bus Load Verification:
CAN FD Baud Rate Configuration:
CAN Callback Function Handling:
FlexCAN Interrupt Priority Adjustment:
Potential Issue in CAN_RX_messageQueue():
FIFO Error Interrupt Handling:
Given that flashing worked fine in the SDK-based software (B Sample) but fails in the RTD-based software (C Sample), we suspect an issue with how the RTD CAN driver handles transmission and reception, especially under high load scenarios like UDS Transfer Data.
To assist in debugging, we will be sharing the following:
Could you please review our implementation and help us identify potential issues or missing configurations in the RTD CAN driver? Also, any recommendations for debugging FIFO processing and ensuring message reliability during high-rate CAN transfers would be greatly appreciated.
Looking forward to your insights and support.
Hi@AdithyaJayaram1
Could you please check it again, i have delected the picture in your reply.
Hi@AdithyaJayaram1
In fact, I have read all the files you provided. You have a similar case, and the above suggestions also come from me.
For us, we cannot reproduce your problem. The UDS protocol services and FreeRTOS you provided are not within the scope of our support.
Unless you can provide a basic project that does not involve your protocol stack or FreeRTOS, we can help you locate and analyze the cause of the problem.
I've attached the package for SDK version SW, and in this we don't see such issues , so your end please check this once and let me know if you're able to find out anything
and also attached configuration difference between both DK and RTD based SW
Hi@AdithyaJayaram1
I compared the FlexCAN configuration you provided, and I think there is no difference.
Here are some possibilities I can think of
1. Is it possible that the interrupt of FlexCAN is not handled in time, resulting in the missing frame of reception or transmission, which leads to no response to the request of UDS service.
Troubleshooting method
.Add the error interrupt of FlexCAN to confirm whether the overflow caused by untimely processing leads to frame loss
Your FlexCAN0 uses FIFO0 reception, and FlexCAN2 uses CAN FD+MB interrupt. The former can be checked by "FLEXCAN_EVENT_RXFIFO_WARNING" or "FLEXCAN_EVENT_RXFIFO_OVERFLOW",
and the latter can be checked by "FLEXCAN_IP_INT_RX_WARNING"
2. Is it due to RTOS? Can your application code be tested under non-RTOS conditions?
3. Compiler optimization level settings, etc. After all, the GCC versions used by these two SDK versions are not consistent.
I have thought of many possibilities, and I can only give you some troubleshooting suggestions because I can't reproduce your problem!
Hello,
We have gathered the compiler optimization settings for both the SDK-based software (S32DS 2018.R1) and the RTD-based software (S32DS 3.5). Please find the attached zip file of screenshots for reference.
Additionally, we made a change in the RTD-based software optimization from Os to O2, and we observed a difference in flashing behavior. The updated flashing logs for both the older and modified settings are also attached.
Could you compare the compiler optimization settings between SDK and RTD-based software and suggest any necessary changes to align them for better performance?
and also are there any additional settings we should modify to ensure proper execution in RTD-based software?
because after changing the optimization from OS to O2, we saw the difference and think optimization has something to do with this issue.
Hi@AdithyaJayaram1
“
Could you compare the compiler optimization settings between SDK and RTD-based software and suggest any necessary changes to align them for better performance?
and also are there any additional settings we should modify to ensure proper execution in RTD-based software?
”
I don't have more experience with this。
If the compilation options help your problem, you can try different compilation optimization levels, such as -O1, or even -O0. If this is indeed a problem caused by the compilation priority, then you should check your protocol stack. At least the routines we provide currently support -O2 optimization level.
You can have a try below settings, if still can't work as expected, then you can try -O1,or even -O0
Thanks for all the suggestions provided by you, It really helped us to figure out the root cause for the issue we were facing
Is it possible to provide any documentation that is available for GCC 10.2 for Arm 32-bit Bare-Metal and similarly for GCC 6.3 also
and also it would be great if some compiler expert from your team could look at the documents that I've shared erlier with you and suggest us with right set of optimization
Hi@AdithyaJayaram1
Good to hear that,
you can find this document in the path shows in the picture.
Also, i have attach it for your reference.
No expert can directly advise you on how to configure optimization options for your code.
This usually requires you to perform compliance testing on your code yourself.
Hi, As i mentioned in earlier questions we have been using the NXP SDK (RTM 3.0.2) in our earlier software implementation. However, in our current development, we have transitioned to RTD (NXP RTD AUTOSAR 4.7. Build version: S32K1_RTD_2_0_0_D2308_ASR_REL_4_7_REV_0000_20230804) as part of the software update.
I would like to understand the key reasons behind the transition to RTD. Specifically, I would appreciate insights on:
Justification for Switching to RTD
Is there any specific technical or strategic reason why RTD is now preferred over SDK?
Are there any long-term support or compatibility benefits that RTD offers over SDK?
Major Differences Between RTD and SDK
Could you provide a comparison of the architectural and functional differences between RTD and SDK?
Are there any performance, memory, or flexibility improvements with RTD?
Safety-Related Certifications
Does RTD include any functional safety (ISO 26262) or other safety-related certifications that were not available in SDK?
If yes, could you provide more details on the safety enhancements in RTD?
Hi@AdithyaJayaram1
Can you create a new topic for your new topic, thanks for your understanding.
We are currently experiencing a write timeout issue in the CAN TP layer while flashing over UDS. Initially, no data bytes were being transferred before the timeout. However, after applying certain optimizations, we now observe that some data gets transmitted before the timeout occurs.
Given this behavior, we would like to understand if there are any application examples or reference implementations that address similar scenarios, particularly in: