Part Number: AM3352
Tool/software: Linux
Hi all,
Our custom board have no audio on it, therefore I didn't use mcasp diver on it.
But our buzzer is connect to pin(V16) to generate signal driving the buzzer,
The buzzer need to get clock signal(high->low->high->low), so I think I can use pin(V16) as mcasp0_aclkx ti generate clock signal,
I wrote a module(.ko) to configure this pin:
#define BASE 0x46000000
#define SIZE 0x400000 //4Mb
#define ACLKX 0xb0
static int test_init(void)
{
u32 reg;
printk("buzzer start!\n");
if(!request_mem_region(BASE, SIZE, "buzzer")){
pr_err("request_mem_region failed!\n");
return -1;
}
pr_info("request_mem_region success!\n");
base = ioremap_nocache(BASE, SIZE);
if(base == NULL){
pr_err("ioremap failed!\n");
return -1;
}
pr_info("ioremap_success!\n");
// __raw_write(BIT(5)|BIT(7), base+ACLKX);
reg = __raw_read(base);
pr_info("reg = %lx\n", reg);
return 0;
}
but dead in __raw_read(reg):
Unhandled fault: external abort on non-linefetch (0x1028) at 0xd1000000
...
...
Is mcasp0 base address 0x46000000 ? or I need to use hole mcasp driver?