Hi All,
I'm following the tutorial "Sending data via UART and monitoring signals with FreeMASTER" available at the following address : https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/Sending-data-via-UART-and-monitoring-signa...
I couldn't manage to make it work and I believe I have found the root of my problem:
1) From Simulink I'm taking the "correct" configuration project template, which is:
2) In S32CT, it seems like there is a mismatch between the tutorial and what I have in the "platform section":
whereas in the tutorial interrupt "LPUART2_IRQn" has a handler "LPUART_UART_IP_2_IRQHandler". I haven't changed anything so far (see tutorial section 2.5).
Could it be because I'm on Matlab2023b? The tutorial was published the 12-09-2024, has any update been implemented since then?
More generally speaking, what should I do to "activate" the access to an interrupter that has an undefined_handler in the MBDT framework?
Thank you in advance for your support!
Aris
解決済! 解決策の投稿を見る。
Hello @Aris_ ,
I can confirm that in the current version of the Toolbox, the UART2 interrupt is not enabled in the S32K344-Q172 configuration. This may be due to small changes or improvements brought between versions.
If you simply want to use a MR-CANHUBK344 compatible configuration, the quickest and easiest way would be to select the custom configuration we provide in the Model-Based Design Toolbox, by selecting it from the dropdown:
In case you are trying to go through the tutorials, to create a custom configuration starting from the S32K344-Q172 one, then you can add the UART2, the way it is shown in the picture. I think the picture in the article is supposed to show how it would look after the changes (enabling UART2, disabling UART6), but the text underneath does not reflect that.
As for your question, enabling an interrupt is as simple as enabling the checkbox, setting a priority level and then writing the name of the Interrupt handler you will be using for that interrupt. To find out the name of the RTD interrupt you should use, you can either check out similar interrupts that are already configured, or look inside the respective RTD files, but that is slightly more time consuming. For example, you can find the UART interrupt handler names inside the Lpuart_Uart_Ip_Irq.c file.
I hope this clarifies the issue you have experienced. Let me know if the solution works on your end and whether you need help with anything else.
Regards,
Robert V
Hello @Aris_ ,
I can confirm that in the current version of the Toolbox, the UART2 interrupt is not enabled in the S32K344-Q172 configuration. This may be due to small changes or improvements brought between versions.
If you simply want to use a MR-CANHUBK344 compatible configuration, the quickest and easiest way would be to select the custom configuration we provide in the Model-Based Design Toolbox, by selecting it from the dropdown:
In case you are trying to go through the tutorials, to create a custom configuration starting from the S32K344-Q172 one, then you can add the UART2, the way it is shown in the picture. I think the picture in the article is supposed to show how it would look after the changes (enabling UART2, disabling UART6), but the text underneath does not reflect that.
As for your question, enabling an interrupt is as simple as enabling the checkbox, setting a priority level and then writing the name of the Interrupt handler you will be using for that interrupt. To find out the name of the RTD interrupt you should use, you can either check out similar interrupts that are already configured, or look inside the respective RTD files, but that is slightly more time consuming. For example, you can find the UART interrupt handler names inside the Lpuart_Uart_Ip_Irq.c file.
I hope this clarifies the issue you have experienced. Let me know if the solution works on your end and whether you need help with anything else.
Regards,
Robert V
Perfect, it works perfectly now.
It's indeed the "configuration project template" that has to change between the official tutorial and what has to be done now.
Thanks a lot RobertV
Hello @Aris_ ,
Glad to hear it worked.
If you have any other questions regarding the Model-Based Design Toolbox, feel free to reach out to us.
Regards,
Robert V