Setting initial pin value on PTD/PTB pins using MQX

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

Setting initial pin value on PTD/PTB pins using MQX

ソリューションへジャンプ
1,019件の閲覧回数
cwati
Contributor III

Hi there,
I have a question on how to set the initial value of some PT* pins.

I'm running the experiment with Freescale FRDM K22F & paired with Atheros GT202.

All of the information regarding setting initial pin values seem to be happening after MQX's main.
However, I notice that in the init_hardware(), which is called way before MQX main starts, the value of some PTD & PTB, especially PTD4 & PTB19 (correspondingly SPI CS & PWD for the Atheros) are set to high (around 3v).


PTD5, however (SPI CLK) is floating on around 1v.

So, who was setting these PTD4 & PTB19 to high even before MQX main start?  Is it somewhere in the software setting?

Thanks,
Cecylia

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
724件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Cecylia:

init_hardware is called by toolchain, it will configure PLL, clocks, and memories.

In your case, PTD5 default  is analog, PTD4 and PTB19 default are high impedance state. All of the states are dependent on the peripheral circuit.

Regards

Daniel

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
725件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Cecylia:

init_hardware is called by toolchain, it will configure PLL, clocks, and memories.

In your case, PTD5 default  is analog, PTD4 and PTB19 default are high impedance state. All of the states are dependent on the peripheral circuit.

Regards

Daniel

0 件の賞賛
返信
724件の閲覧回数
cwati
Contributor III

OK, thanks for confirming.  That means for PTD4 & PTB19 in this circuitry, the pins are high because the peripheral circuit sets them high?

0 件の賞賛
返信
724件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

I think so

0 件の賞賛
返信