Port D bit BME on KE04

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

Port D bit BME on KE04

ソリューションへジャンプ
1,345件の閲覧回数
jun1
Contributor V

Hi.

Always thank you for your help.

Please tell me below.

I am using KE04.

See `` How to Use Bit-band and BME on the KE04 and KE06 Subfamilies AN4838 ''
An attempt was made to set bit 2,1,0 of port D to 0 using a macro in BME.h.

As described in “3.5 BME Library” in the above application manual

     BME_AND (& GPIOD-> PDOR) = ~ ((1u << 2) | (1u << 1) | (1u << 0));

However, there is no GPIOD definition.

According to the manual, the upper 8 bits of the 32-bit area indicated by the GPIOA address are assigned to port D.

So how do you write the bit set clear for port D in the BME library?

Thank you.

jun

ラベル(1)
0 件の賞賛
返信
1 解決策
1,209件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi jun,

yes, there isn't GPIOD. If you want to set and clear PTD0, PTD1, PTD2, you can write as below

        BME_OR(&GPIOA->PDOR) = (0x07<<24);
        BME_AND(&GPIOA->PDOR)= ~(0x07<<24);

Regards,

Jing

元の投稿で解決策を見る

2 返答(返信)
1,209件の閲覧回数
jun1
Contributor V

Hi.

I am always grateful for your help.

Oh, yes. That's because it is placed in the upper bits.

well understood.

jun

0 件の賞賛
返信
1,210件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi jun,

yes, there isn't GPIOD. If you want to set and clear PTD0, PTD1, PTD2, you can write as below

        BME_OR(&GPIOA->PDOR) = (0x07<<24);
        BME_AND(&GPIOA->PDOR)= ~(0x07<<24);

Regards,

Jing