# HG changeset patch # User Mychaela Falconia # Date 1477444160 0 # Node ID c90b1fff224a420e4fd7234014eca33f3864978b # Parent f24b3108260519c1f378e99f9c2eee1f1dc71826 pirexplore: buzzer commands added to exercise the vibrator diff -r f24b31082605 -r c90b1fff224a target-utils/pirexplore/cmdtab.c --- a/target-utils/pirexplore/cmdtab.c Wed Oct 26 00:02:27 2016 +0000 +++ b/target-utils/pirexplore/cmdtab.c Wed Oct 26 01:09:20 2016 +0000 @@ -4,6 +4,8 @@ extern void cmd_abbw(); extern void cmd_baud_switch(); extern void cmd_blit(); +extern void cmd_buz(); +extern void cmd_buzlev(); extern void cmd_dieid(); extern void cmd_find(); extern void cmd_flashid(); @@ -33,6 +35,8 @@ {"abbw", cmd_abbw}, {"baud", cmd_baud_switch}, {"blit", cmd_blit}, + {"buz", cmd_buz}, + {"buzlev", cmd_buzlev}, {"dieid", cmd_dieid}, {"dump", cmd_memdump_human}, {"ffsinit", mpffs_init}, diff -r f24b31082605 -r c90b1fff224a target-utils/pirexplore/main.c --- a/target-utils/pirexplore/main.c Wed Oct 26 00:02:27 2016 +0000 +++ b/target-utils/pirexplore/main.c Wed Oct 26 01:09:20 2016 +0000 @@ -13,14 +13,17 @@ *(volatile u16 *)0xfffffb02 = 0x00A4; *(volatile u16 *)0xfffffb06 = 0x00A4; *(volatile u16 *)0xfffef006 = 0x0008; + /* setup matching what the official firmware does */ + *(volatile u16 *)0xfffef008 = 0x6050; + *(volatile u16 *)0xfffef00a = 0x021F; /* * Other register settings replicating what OsmocomBB does * in board/pirelli_dpl10/init.c */ - *(volatile u16 *)0xfffef008 = 0x7090; - *(volatile u16 *)0xfffef00a = 0x021F; *(volatile u16 *)0xfffe4804 = 0xFF6D; *(volatile u16 *)0xfffe4802 = 0x0000; + /* enable ARMIO clock in order to exercise buzzer/vibrator */ + *(volatile u16 *)0xfffe4806 = 0xFFF3; /* nCS4 setup for SPCA552E */ *(volatile u16 *)0xfffffb0a = 0x00A7; /* initialize PWL registers like OsmocomBB does */