I don’t think the system is even booting properly.
If you run it under debugger, can you verify that you’re not reaching main()?

Here’s few things that you should look at:
TIMER_4 does not exist with the BSP you’re using.
So you could try adjusting LORA_MAC_TIMER_NUM to 3,
and saying TIMER_3=1, instead of TIMER_4.
Look for the hal timers for this BSP in hw/bsp/nrf51dk/syscfg.yml

> On Nov 29, 2017, at 9:02 AM, K Dmitry <dimka...@yandex.ru> wrote:
> 
> 
> I've connected SX1276 with some wires but not sure if connection is good. 
> Also I've added debug info:
> 
> $ newt target show
> targets/nrf51lora_app
>    app=@apache-mynewt-core/apps/lora_app_shell
>    bsp=@apache-mynewt-core/hw/bsp/nrf51dk
>    build_profile=debug
>   
> syscfg=BASELIBC_ASSERT_FILE_LINE=1:LORA_MAC_TIMER_NUM=4:SHELL_CMD_ARGC_MAX=20:SYSINIT_PANIC_FILE_LINE=1:SYSINIT_PANIC_MESSAGE=1:TIMER_4=1
> targets/nrf51lora_boot
>    app=@apache-mynewt-core/apps/boot
>    bsp=@apache-mynewt-core/hw/bsp/nrf51dk
>    build_profile=optimized
> 
> Then build image:
> 
> $ newt clean nrf51lora_app
> $ newt build nrf51lora_app
> $ newt create-image nrf51lora_app 0.0.1
> $ newt load nrf51lora_app
> 
> Nothing has changed in UART:
> 
> 000000 ICSR:0x00421002
> 000000 Assert @ 0x10e0d
> 000000 Unhandled interrupt (2), exception sp 0x200013d0
> 000000  r0:0x00000000  r1:0x00000000  r2:0x80000000  r3:0xe000ed00
> 000000  r4:0x00010e0d  r5:0x00000044  r6:0x00000008  r7:0x20002820
> 000000  r8:0xffffffff  r9:0xffffffff r10:0xffffffff r11:0xffffffff
> 000000 r12:0xfffff7fe  lr:0x0000906b  pc:0x000081cc psr:0x81000200
> 
> Using gdb I got to these lines:
> os_arch_os_init () at 
> repos/apache-mynewt-core/kernel/os/src/arch/cortex_m0/os_arch_arm.c:195
> 190       os_error_t err;
> 191       int i;
> 192   
> 193       /* Cannot be called within an ISR */
> 194       err = OS_ERR_IN_ISR;
> 195       if (__get_IPSR() == 0) {
> 196           err = OS_OK;
> 
> And a bit later:
> 
> os_init (main_fn=0x84dd <main>) at 
> repos/apache-mynewt-core/kernel/os/src/os.c:186
> 186       assert(err == OS_OK);
> (gdb) p err
> $5 = OS_ERR_IN_ISR
> 
> Not sure if this it cause or consequence.

Reply via email to