diff target-utils/pirexplore/main.c @ 38:c90b1fff224a

pirexplore: buzzer commands added to exercise the vibrator
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 26 Oct 2016 01:09:20 +0000
parents e7502631a0f9
children
line wrap: on
line diff
--- 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 */