S32DS general query

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32DS general query

956件の閲覧回数
shashankanand
Contributor I

Hi, 

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.

     e.g.

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

Thanks.

Shashank anand

ラベル(1)
タグ(2)
0 件の賞賛
1 返信

770件の閲覧回数
jiri_kral
NXP Employee
NXP Employee

Hi, 

You can start with EVB schematic - to find out where are for example LEDs connected 

https://www.nxp.com/downloads/en/schematics/S32K144EVB-SCH.pdf 

For more details about peripherals, registers and so on you can look into reference manual:
https://www.nxp.com/docs/en/reference-manual/S32K-RM.pdf 

Good starting point for bitwise operations is for example here - Tutorial : Embedded programming basics in C - bitwise operations 

Jiri