打印

How to control the GPIO P0.18 to output High and low with nrf52832?

[复制链接]
32|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
Raygong1207|  楼主 | 2024-12-17 10:13 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
background:

1: my board  is the same with the nRF52832-CIAA Reference Layout 1_0 from nordic docs.

2: the source code is from sample code: blinky_led

3: only change the led0 to led1

#define LED0_NODE DT_ALIAS(led0)
to
#define LED0_NODE DT_ALIAS(led1)
My question is that:

1: seems that the output reg is right (at least the reg value can be change with my control), but  the measured voltage is always 3.3V with multimeter.

2: whether below reg value can show all info about gpio P0.18 ?

the reg value is below when control high.

CNF[18] = 0X00000003

OUT = 0X00040060  // Here changed, bit 18 to 1

IN = 0X002001C0

DIR = 0X00040060

LATVCH = 0X0

DETECTMODE = 0X0

the reg value is below when control LOW.

CNF[18] = 0X00000003

OUT = 0X00000060   // Here changed,bit 18 to 0

IN = 0X002001C0

DIR = 0X00040060

LATVCH = 0X0

DETECTMODE = 0X0

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3

主题

10

帖子

0

粉丝