Functions of S32K144 using Simulink (Basic)

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

Functions of S32K144 using Simulink (Basic)

1,465 Views
kkj1304
Contributor I
Hi,
I'm currently a PhD student. I plan to build and compile at board that contained S32K144 MCU.
I have a question because I haven't been using Simulink. (Although I have done basic learning, I feel difficulties)
Function I want to use
- CAN Data Receive/Transmit
- ADC Measurement (12V voltage measurement)
- UART communication (Communicate with BQ76PL455A)
- GPIO (Digital Output: 0 -> 1, Digital Input: 0 -> 1)

Q1.
I have written the composition as follows, please advise easily.
1.png2.png
Q2.
- When the external signal changes from 0 to 1, I want to change the Fault bit.
How do I set it up to do this? (Digital Input function)
- I am also curious if the MCU changes the signal from 0 to 1. (Digital Output function)
3.png
Labels (2)
Tags (2)
0 Kudos
1 Reply

1,438 Views
mariuslucianand
NXP Employee
NXP Employee

Hello kkj1304@naver.com‌,

Welcome to the world of Simulink! I am glad that you've started by using our toolbox!

1. The model composition looks good, you delimited the configuration blocks from the action blocks.

2. The GPI read block will check the state of the selected pin and will return 1 if the state is high logic and 0 if the state is low logic. If you are expecting changes that are critical, you may want consider using interrupt blocks. For the outputs is the same behavior if you provide 1 to the output block, this will set a high logic state on the output pin and low logic state on the pin if the input of the block is 0.

Before starting to develop your project, I would strongly suggest testing how our blocks behaves using our examples.

Hope this helps,

Marius

0 Kudos