Re: zephyr question


Carles Cufi
 

Hi there,

 

I just tried this but instead of using menuconfig I changed my prj.conf like this:

 

diff --git a/samples/bluetooth/peripheral_hr/prj.conf b/samples/bluetooth/peripheral_hr/prj.conf

index 08ebfd7e4..77e989c84 100644

--- a/samples/bluetooth/peripheral_hr/prj.conf

+++ b/samples/bluetooth/peripheral_hr/prj.conf

@@ -4,3 +4,6 @@ CONFIG_BT_SMP=y

CONFIG_BT_PERIPHERAL=y

CONFIG_BT_DEVICE_NAME="Zephyr Heartrate Sensor"

CONFIG_BT_DEVICE_APPEARANCE=833

+

+CONFIG_SERIAL=n

+CONFIG_UART_CONSOLE=n

 

 

With this I ran samples/bluetooth/peripheral_hr 5 times on a PCA10040 and tested it (connecting with an iPhone running LightBlue) and had no issues at all.

 

Which Zephyr version are you using? I tried the latest master.

Regards,

 

Carles

 

From: devel@... <devel@...> On Behalf Of Hsu, Hanyu
Sent: 26 June 2018 16:29
To: zephyr-devel@...
Cc: Dunk Chen <dunk.chen@...>; Bochang Lian (
連柏蒼) (bochang_lian@...) <bochang_lian@...>
Subject: [Zephyr-devel] zephyr question

 

Hi Sir,

 

We occurred some question when we use zephyr in nRF52832.

 

We found there were some chips cannot boot-up w/ Zephyr sample code (disable UART), but can boot up well w/ Nordic original sample code (ble_app_hrs).

But if we enabled the UART function of Zephyr sample code, the failure chip can boot up well.

 

Below is our test environment and procedure.

 

  1. We use zephyr sample 'peripheral_hr'  to test and the result as below.

For attached file,

- peripheral_hr_uart: The board configuration of PCA10040 in Zephy.

- peripheral_hr_no_uart: The board configuration of Nordic PCA1004. Disable UART through “menuconfig”

 

  1. For the block in red, we dump the debug information of back trace through J-link.

 

  1.  Test procedure of Zephyr:
  1. Download and install zephyr SDK and zephyr ( http://docs.zephyrproject.org/1.8.0/getting_started/getting_started.html)
  1. Enter samples/bluetooth/peripheral_hr
  1. Create the firmware of peripheral_hr: make BOARD=nrf52_pca10040 -> It’s the firmware of “peripheral_hr_uart” (w/ UART).
  1. Create the firmware of “peripheral_hr” that remove UART: procedure as below.

          1) make BOARD=nrf52_pca10040  menuconfig

2) Disable ‘Console drivers', 'Serial Drivers': Enter path “Device Drivers

          3) make BOARD=nrf52_pca10040 -> for the firmware of “peripheral_hr_no_uart

 

NO

序號

peripheral_hr_uart

peripheral_hr no uart

2

91000195760281

pass in test 5 times

#0 k_cpu_idle () 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core\cpu_idle.S:135 

#1 0x00010de8 in _SysFatalErrorHandler (reason=<optimized out>, 

pEsf=<optimized out>) 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core/sys_fatal_error_handler.c:70 

#2 0x00010d52 in __usage_fault () 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core\fault_s.S:108 

#3 <signal handler called> 

#4 0x96cdd3c2 in ?? () 

#5 0x9ef66fc2 in ?? () 

6

91000195760221

pass in test 5 times

#0 k_cpu_idle () 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core\cpu_idle.S:135 

#1 0x00010de8 in _SysFatalErrorHandler (reason=<optimized out>, 

pEsf=<optimized out>) 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core/sys_fatal_error_handler.c:70 

#2 0x00010d52 in __usage_fault () 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core\fault_s.S:108 

#3 <signal handler called> 

#4 0x000090b2 in mayfly_run (callee_id=<optimized out>) 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/subsys/bluetooth/controller/util/mayfly.c:138 

#5 0x00010e92 in _isr_wrapper () 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core\isr_wrapper.S:126 

#6 <signal handler called> 

#7 0x36bf0d32 in ?? () 

#8 0x5447ef66 in ?? () 

17

91000195760393

pass in test 5 times

#0 k_cpu_idle () 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core\cpu_idle.S:135 

#1 0x00010de8 in _SysFatalErrorHandler (reason=<optimized out>, 

pEsf=<optimized out>) 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core/sys_fatal_error_handler.c:70 

#2 0x00010d52 in __usage_fault () 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core\fault_s.S:108 

#3 <signal handler called> 

#4 0x000090b2 in mayfly_run (callee_id=<optimized out>) 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/subsys/bluetooth/controller/util/mayfly.c:138 

#5 0x00010e92 in _isr_wrapper () 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core\isr_wrapper.S:126 

#6 <signal handler called> 

#7 0xff324b36 in ?? () 

#8 0xaf7e65d2 in ?? () 

23

91000195760180

pass in test 5 times

#0 k_cpu_idle () 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core\cpu_idle.S:135 

#1 0x00010de8 in _SysFatalErrorHandler (reason=<optimized out>, 

pEsf=<optimized out>) 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core/sys_fatal_error_handler.c:70 

#2 0x00010d52 in __usage_fault () 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core\fault_s.S:108 

#3 <signal handler called> 

#4 0x4ee6f87e in ?? () 

#5 0x0000a2f4 in ticker_job_list_insert (insert_head=<optimized out>, 

instance=0x200012b0 <_instance>) 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/subsys/bluetooth/controller/ticker/ticker.c:831 

#6 ticker_job (instance=0x200012b0 <_instance>) 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/subsys/bluetooth/controller/ticker/ticker.c:1135 

#7 0x000090ba in mayfly_run (callee_id=<optimized out>) 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/subsys/bluetooth/controller/util/mayfly.c:141 

#8 0x00010e92 in _isr_wrapper () 

at D:/msys64/home/fresh.lee/smart_button_debug/zephyr-zephyr-v1.8.0/arch/arm/core\isr_wrapper.S:126 

#9 <signal handler called> 

#10 0xe9c5b7ba in ?? () 

#11 0x78fe918e in ?? () 

 

Join {devel@lists.zephyrproject.org to automatically receive all group messages.