Issue in tutorial: Sending data via UART and monitoring signals with FreeMASTER

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Issue in tutorial: Sending data via UART and monitoring signals with FreeMASTER

跳至解决方案
924 次查看
Aris_
Contributor II

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:

Aris__0-1742049645402.png

2) In S32CT, it seems like there is a mismatch between the tutorial and what I have in the "platform section":

Aris__1-1742049807834.pngAris__2-1742049856607.png

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

标记 (1)
0 项奖励
回复
1 解答
884 次查看
robertv
NXP Employee
NXP Employee

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:

robertv_0-1742202801521.png

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 

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
885 次查看
robertv
NXP Employee
NXP Employee

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:

robertv_0-1742202801521.png

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 

 

0 项奖励
回复
853 次查看
Aris_
Contributor II

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

0 项奖励
回复
847 次查看
robertv
NXP Employee
NXP Employee

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

0 项奖励
回复