# HG changeset patch # User Mychaela Falconia # Date 1558923582 0 # Node ID da53ea0a38ba945f29bbbecf49bcae1d41ff08cb # Parent cb33d81f1386c6c9645fa4c2a9f70fc74a987835 c139explore: osmo_delay_ms-ectomy and GPIO init fix diff -r cb33d81f1386 -r da53ea0a38ba target-utils/c139explore/main.c --- a/target-utils/c139explore/main.c Mon May 27 02:01:26 2019 +0000 +++ b/target-utils/c139explore/main.c Mon May 27 02:19:42 2019 +0000 @@ -1,13 +1,15 @@ #include "types.h" +#define DELAY_1MS 13000 + main() { /* delay kludge workaround for defect in fc-compalram */ - osmo_delay_ms(30); + wait_ARM_cycles(DELAY_1MS * 30); printf("C139 hardware exploration utility running\n"); - /* GPIO init */ + /* GPIO init, compatible with both C139 and SE J100 */ *(volatile u16 *)0xfffe4802 = 0x0002; - *(volatile u16 *)0xfffe4804 = 0xFFF5; + *(volatile u16 *)0xfffe4804 = 0x2A59; *(volatile u16 *)0xfffe4806 = 0xFFF3; /* enable ARMIO clock */ /* take peripherals out of reset */ *(volatile u16 *)0xfffffd04 = 0xFFF3;