AnsweredAssumed Answered

S32DS general query

Question asked by Shashank Anand on Mar 23, 2018
Latest reply on Mar 23, 2018 by Jiri Kral



I am new to embedded programming. I was looking at an example in S32 DS with name 'hello'. I am using S32K144_100 EVB.

Can anyone explain

a). The meaning of (1<<PTC12) or ~(1<<PTC12) i.e. 1<<PTXn, where 'X' denotes port and 'n' denotes pin number.

b). Is it okay to first declare a pin as input/output and then configure it as GPIO.


      PTC->PDDR &= ~(1<<PTC12); /* Port C12: Data Direction= input (default) */
      PORTC->PCR[12] = 0x00000110; /* Port C12: MUX = GPIO, input filter enabled */



Shashank anand