在am335x evm的串口终端输入以下命令时,蜂鸣器会响
echo 55 > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio55/direction
echo 1 > /sys/class/gpio/gpio55/value
使用PRU可以把蜂鸣器响起来吗?
sdk的例子修改?
#include <stdint.h>
#include <pru_cfg.h>
#include "resource_table_empty.h"
volatile register uint32_t __R30;
volatile register uint32_t __R31;
void main(void)
{
volatile uint32_t gpio;
/* Clear SYSCFG[STANDBY_INIT] to enable OCP master port */
CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;
/* Toggle GPO pins TODO: Figure out which to use */
gpio = 0x000F;
/* TODO: Create stop condition, else it will toggle indefinitely */
while (1) {
__R30 ^= gpio;
__delay_cycles(100000000);
}
}
Shine:
请问pinmux配置了么?
LL shutor:
回复 Shine:
你好,Shine Zhang
ti-processor-sdk-linux-rt-am335x-evm-03.03.00.04上是在dts配置pinmux的吗?有am335x evm板子的关于pinmux使用的文档吗
Shine:
回复 LL shutor:
是的,在dts设备树里修改。请参考下面的帖子。
e2echina.ti.com/…/91147
yongqing wang:
回复 LL shutor:
这个讲的比较详细了:blog.csdn.net/…/50499886