MPC5744 MBD :The same pin can be used as input or output

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

MPC5744 MBD :The same pin can be used as input or output

1,376 Views
fanchang
Contributor I

  I set MPC5744's(LQFP144) Pin[14] A5 as the seven pin of  SPIO RTC chip (SIO) ,the pin is Nonstandard SPI timing ,so it must be used as input or output,how can I do?  The chip is S-35190A (for automotive 3-wire real-time clock. please give a design diagram,thanks!

Tags (1)
0 Kudos
4 Replies

919 Views
xielinda
Contributor I

Hi fan tianchen,

      Can you send to me a MBD Tools for MPC5744?

      My email is 819364029@qq.com

  THX;

Linda Xie

0 Kudos

919 Views
fanchang
Contributor I

I see.I know the input and output setup related to the time,but I can know how to design“

无标题.png

How to set the pin to input and output in no same time by MPC5744 MBD tools?

0 Kudos

919 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi fanchang‌,

I checked the toolbox capabilities regarding this matter - and i'm sorry to inform you - but such functionality is not supported.

The Simulink Code Generations has 3 main functions where it can place the code: initialize, step and terminate. All that code that configures/initialize a peripheral is placed in the initialize function - that is executed only once at the application start. 

In that function we can not have the same pin selected as INPUT and OUTPUT, therefore such scenario not supported.

To be honest i do not know how you could use it without some low level programming to control the state of that pin.

Perhaps you could try to use our standard DSPI block and use the SDPI_Transmit to configure the pins as normal SPI but in the HW to connect the same SIO to both SIN and SOUT from the MPC5744. Then with some logic to read the SOUT only when the S-35190A is transmitting.

This use-case looks like a loop back on SPI - so you will receive both the messages you transmit and the messages from the S-35190A. You discard the command message and you end up with the useful information for RTC. That might work.

You can check this video https://community.nxp.com/thread/453727  to see how you can program the standard SPI.

Hope this helps you!

Daniel

0 Kudos

919 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi fanchang‌,

Can you please clarify what do you mean by a "design diagram" ?

You like to see a Simulink model to implement such functionality or some a HW diagram about how to wire these chips ?

Best regards,
Daniel

0 Kudos