S32K144 MBDT FlexIO UART Error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K144 MBDT FlexIO UART Error

Jump to solution
2,637 Views
kmun61a
Contributor II

Hello!!

I am making Serial-to-CAN convert module using NXP S32K144 evaluation kit.

System configuration is as below,

(There are two serial communications and 15 digital Inputs in my Serial-to-CAN convert module.)

block diagram.jpg

The Serial-to-CAN convert module transmits and receives 32bytes data between S32K144 and Touch Panel as below,

example.jpg

In my project, a serial communication between S32K144 and Touch Panel is stable and good if using the FlexIO UART Blocks in model based design toolkit.

However, the problem is when I use two touch panels as below,

entire_program.jpg

When I just Run above program, there is no error. However, when I try to build the program, an error happens as below,

error_message.jpg

Please, help me out!!

Thank you very much.

For your reference, I set the FlexIO UART blocks as below,

FlexIO UART Config.jpg

Instance is set to 0 in case of vehicle touch panel. Instance is set to 2 in case of Robot Arm touch panel. 

FlexIO_UART_Receive_ISR.jpg

FlexIO_UART_Transmit_ISR.jpg

Labels (1)
1 Solution
2,014 Views
constantinrazva
NXP Employee
NXP Employee

Hello kmun61a@gmail.com,

Could you replace the following files I have provided in the .zip attached here?

{TOOLBOX_ROOT}\mbdtbx_s32k\blocks\flexio_uart\flexio_uart_s32k_receive_isr.tlc

{TOOLBOX_ROOT}\mbdtbx_s32k\blocks\flexio_uart\flexio_uart_s32k_transmit_isr.tlc

[added] {TOOLBOX_ROOT}\mbdtbx_s32k\blocks\flexio_uart\flexio_uart_s32k_config.tlc

You can just rename the existing files by adding something like _old at their name and then copy these new files.

Please let me know if you're still facing issues with your model.

Kind regards,

Razvan.

edit: Also added changes to the config block (last file).

View solution in original post

10 Replies
2,014 Views
constantinrazva
NXP Employee
NXP Employee

Hello kmun61a@gmail.com,

Could you share the model you are using? You can remove any proprietary code from it, as long as the issue is replicated. Thank you.

Kind regards,

Razvan.

2,014 Views
kmun61a
Contributor II

Dear Constantin Razvan Chivu,

Thank you for your prompt answer.

I attached my Simulink code as you asked.

I am looking forward to receiving good solution.

Best regards,

Mr. Hyoil Kim.

0 Kudos
2,014 Views
constantinrazva
NXP Employee
NXP Employee

kmun61a@gmail.com,

Just wanted to mention that you can use regular UART blocks for your application. FlexIO is an adaptable peripheral that can emulate protocols like UART. You can read more here - [FlexIO] Flex your muscles with the latest MBDToolbox release. If you already knew that, sorry for the spam - just wanted to make sure you are aware of the difference between the UART blocks and the flexIO UART blocks.

Kind regards,

Razvan.

2,015 Views
constantinrazva
NXP Employee
NXP Employee

Hello kmun61a@gmail.com,

Could you replace the following files I have provided in the .zip attached here?

{TOOLBOX_ROOT}\mbdtbx_s32k\blocks\flexio_uart\flexio_uart_s32k_receive_isr.tlc

{TOOLBOX_ROOT}\mbdtbx_s32k\blocks\flexio_uart\flexio_uart_s32k_transmit_isr.tlc

[added] {TOOLBOX_ROOT}\mbdtbx_s32k\blocks\flexio_uart\flexio_uart_s32k_config.tlc

You can just rename the existing files by adding something like _old at their name and then copy these new files.

Please let me know if you're still facing issues with your model.

Kind regards,

Razvan.

edit: Also added changes to the config block (last file).

2,014 Views
kmun61a
Contributor II

Perfectly cleared!!

Thank you very much.

2,014 Views
constantinrazva
NXP Employee
NXP Employee

kmun61a@gmail.com, you are welcome!

Thanks again for posting cool demos showing us what projects you are working on using our toolbox!

Kind regards,

Razvan.

0 Kudos
2,014 Views
constantinrazva
NXP Employee
NXP Employee

kmun61a@gmail.com,

Please note that I have updated the zip by adding 1 other file that has changed - flexio_uart_s32k_config.tlc.

Even if the model was successfully building, the application would have not executed the ISR you expected for flexIO UART - now that is also fixed.

Kind regards,

Razvan.

0 Kudos
2,014 Views
kmun61a
Contributor II

Hello!! Razvan,

Thanks to your answer, my problem was clearly solved.

But, I have one more question.

I will upload it as a new question.

Thank you so much!!

From Kim.

                                                < Serial to CAN >

0 Kudos
2,014 Views
constantinrazva
NXP Employee
NXP Employee

Hello kmun61a@gmail.com,

Thank you for the video! Really nice of you sharing it with us!

I will see you on the other thread once you post it.

Kind regards,

Razvan.

0 Kudos
2,011 Views
kmun61a
Contributor II

Hello Constantin Razvan Chivu,

I have done it as you advised by replacing two *.tlc files.

q2.jpg

Build error was not happened any more. However, I guess serial communication (rx data) is not connected between NXP and touch panel.

Because, there is no change in the FreeMASTER. 

q1.jpg

In addition, if NXP receives the data from touch panel, the Interrupt happens and the Blue LED should be blinked.

However, the Blue LED turns on, which means that the interrupt is not occurred.

q4.jpg 

And then, I tried another test.

I put the "FlexIO UART Transmit ISR block" inside function call block to outside as below (also as attached Simulink file)

q3.jpg 

A Build error is happened again as below,

q5.jpg

I am looking forward to your answer.

Thank you very much.

Best regards,

Mr. Hyoil Kim.

0 Kudos