0
\$\begingroup\$

I have this S32K142 microcontroller, in the 64 pin package.

I have 2 SPI interfaces, 1 I2C interface, 2 UART interfaces, 6 ADC inputs, a few GPIO and PWM output requirements.

My question:

  1. On initial power on condition, what should the state of the SPI interface pins, I2C and UART, ADC pins? Like, should it be pull-up or pull-down or floating?

How to configure those pins upon start up condition and where is this information provided?

  1. From the reference manual, I see that each port has multiple functional peripherals. Since I have 2 SPI interfaces, I am using LPSPI0 (PTB0, PTB1, PTB2, PTB3 ports for LPSPI0 module) and LPSPI1 (PTD0, PTD1, PTD2, PTD3 ports for LPSPI1 module) for the 2 interfaces. Am I correct?

In the reference manual, why are two peripheral chip select options given for the LPSPI0 module in case of PTB5 port? How to understand this?

enter image description here

\$\endgroup\$
5
  • \$\begingroup\$ In general (but I'm not going to read the datasheet here to be sure in this case), MCUs power up any I/O pin (those that support both general input and general output modes) as digital inputs, with their associated specialized peripherals units turned off. There are pin exceptions to this rule (a pin may be examined for a special condition on power-up and this may affect the pin, or a pin may only have an output function and not support input, at all.) But if you must assume (and not read carefully), then that's the way I'd tend to go as a starting point. \$\endgroup\$
    – jonk
    Apr 17, 2021 at 6:57
  • \$\begingroup\$ Are you asking what the state is, or how it should be configured by you? The answer to your questions are in the rererence manual for sure. Reference manuals explain in detail what are the default values after reset and how to configure GPIO pins and what is the default mode. For each pin you can select one of the multiple alternate functions, so the pin you are asking about can have either CS0 or CS1 functionality. @jonk On some MCUs GPIO pins are not even initialized as inputs, they are simply disconnected, and even the GPIO registers can't be accessed unless clocks are initialized. \$\endgroup\$
    – Justme
    Apr 17, 2021 at 7:43
  • \$\begingroup\$ @Justme Agreed. I guess I should have also added that note, as well. Glad to see you did. \$\endgroup\$
    – jonk
    Apr 17, 2021 at 7:45
  • \$\begingroup\$ @Justme, could you tell me where to check these information in the reference manual, please? \$\endgroup\$
    – user220456
    Apr 17, 2021 at 9:50
  • \$\begingroup\$ I'm trying to accomplish , on how the each pin should be during power up condition, or after reset or during sleep. Where can I find this in the reference manual. Could you please guide. \$\endgroup\$
    – user220456
    Apr 17, 2021 at 9:52

1 Answer 1

0
\$\begingroup\$

Para 4.4 Default Pad State

seems to answer the question.

\$\endgroup\$
4
  • \$\begingroup\$ I checked In the Reference manual. There seems to be information for the default state only. So, are there 2 microcontroller states? Like, After Reset and Normal ? There's no state such as Sleep, or During reset? \$\endgroup\$
    – user220456
    Apr 18, 2021 at 9:24
  • \$\begingroup\$ during reset the pins float after reset, para 4.4 determines the state. Sleep - that's up to you. \$\endgroup\$
    – Kartman
    Apr 18, 2021 at 10:59
  • \$\begingroup\$ @kartman can you improve this post so the datasheet didn't have to be referenced? \$\endgroup\$
    – Voltage Spike
    Apr 18, 2021 at 23:11
  • \$\begingroup\$ @Voltage Spike. Might be a bit difficult on a mobile device, but I get your point in terms of having a ‘hard’ reference for historical purposes. \$\endgroup\$
    – Kartman
    Apr 19, 2021 at 0:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.