This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Problems with nrfjprog on Ubuntu 20.04: Bluetooth on nRF53-pdk not working

Hi guys

I try to develope a bluetooth application with a customboard on Zephyr 2.4. At the moment the firmware should work on the nrf5340-pdk until the hardware is ready.

nRF5340-pdk

PCA10095

0.8.0

2019.45

Everything works fine, except the bluetooth part. I tried the zephyr bluetooth examples, but nothing is working... (I do not work with NCS).

1. Bluetooth examples not working

I tried this example:

1. hci_rpmsg: west build -b nrf5340_dk_nrf5340_cpunet && west flash

2. peripheral_hr: west build -b nrf5340_dk_nrf5340_cpuapp && west flash

or this one

3. central_hr: west build -b nrf5340_dk_nrf5340_cpuapp && west flash

But nothing is working... I tried to change some configurations in prj.conf in my the example and add some LOGs to the source code...

#Nordic nRF53
CONFIG_SOC_SERIES_NRF53X=y
CONFIG_NRF5340_CPUAPP_ERRATUM19=y

#nRF5340 DK nRF5340 Application MCU
#CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP=y
CONFIG_BOARD_NRF5340PDK_NRF5340_CPUAPP=y

#Arm CC3xx hw driver for Nordic devices
#CONFIG_HW_CC3XX

#Arm CC3XX RNG driver for Nordic devices
#CONFIG_ENTROPY_CC3XX=y

#Enable RPMsg configuration for nRF53. Two channels of the IPM driver are used in the HCI driver: channel 0 for TX and channel 1 for RX.
CONFIG_BT_RPMSG_NRF53=y

#enable MCUBoot in the application core
CONFIG_BOOTLOADER_MCUBOOT=y

#enable the Peripheral CPU DFU (PCD) subsys for the MCUBoot image
#CONFIG_PCD=y

#Enable nRF53 Network-Core MCU
CONFIG_BOARD_ENABLE_CPUNET=y

#BLE-Stack: Zephyr Bluetooth LE Controller
#Software-based BLE Link Layer
CONFIG_BT_LL_SW_SPLIT=y

# Driver: GPIO
CONFIG_GPIO=y

# Print
CONFIG_PRINTK=y

# Workaround in nRF53 for function: sys_rand32_get
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y

#GPIO as pin reset (reset button)
CONFIG_GPIO_AS_PINRESET=n

# UART support
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=n

# Log support
CONFIG_LOG=y

# RTT Segger Debugger
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y



#Bluetooth
CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_SMP=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DIS=y
CONFIG_BT_DIS_PNP=n
CONFIG_BT_BAS=y
CONFIG_BT_HRS=y
CONFIG_BT_DEVICE_NAME="Zephyr Heartrate Sensor"
CONFIG_BT_DEVICE_APPEARANCE=833

But it is still not working...

2. nrfjprog is not working

I tried to use nrfjprog instead of west to flash some hex files from here:

https://devzone.nordicsemi.com/f/nordic-q-a/57931/nrf5340-pdk-not-advertising

but sometimes my nrfjprog is not working well...

I use Ubuntu 20.04 on my computer...

NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"

Sometimes I have similiar problems than in this post:

https://devzone.nordicsemi.com/f/nordic-q-a/65297/nrf5340pdk-jlinkarm-cannot-connect/266760#266760

trunidom@lenovo:~/Downloads/Peripheral_Heart_Rate$ sudo nrfjprog --eraseall
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.

This is my log...

[2020-Nov-10 14:54:49] [ info] --------------------------------------------------------------------------------
[2020-Nov-10 14:54:49] [ info] nrfjprog -f NRF53 --program hci_open_amp.hex –-chiperase --log 
[2020-Nov-10 14:54:49] [ info] nrfjprog version 10.10.0 
[2020-Nov-10 14:54:49] [ info] --------------------------------------------------------------------------------
[2020-Nov-10 14:54:49] [debug] [ nRF0x0] - open_dll
[2020-Nov-10 14:54:49] [debug] [ nRF0x0] - Load library at /opt/nrfjprog/libjlinkarm_nrf53_nrfjprogdll.so.
[2020-Nov-10 14:54:49] [debug] [ nRF0x0] - Library loaded, loading member functions.
[2020-Nov-10 14:54:49] [debug] [ nRF0x0] - Member functions succesfully loaded.
[2020-Nov-10 14:54:49] [debug] [Backend] - Logger callback at 0x55874346ce00 registered in Segger backend logger.
[2020-Nov-10 14:54:49] [debug] [  JLink] - [Debug   ] [JLink     ] Logger callback at 0x55874346ce00 registered in JLink logger.
[2020-Nov-10 14:54:49] [debug] [nRF530x0] - open
[2020-Nov-10 14:54:49] [debug] [Backend] - open_dll
[2020-Nov-10 14:54:49] [debug] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2020-Nov-10 14:54:49] [debug] [Backend] - Load library at /opt/SEGGER/JLink/libjlinkarm.so.
[2020-Nov-10 14:54:49] [debug] [Backend] - Library loaded, loading member functions.
[2020-Nov-10 14:54:49] [debug] [Backend] - Member functions succesfully loaded.
[2020-Nov-10 14:54:49] [debug] [Backend] - dll_version
[2020-Nov-10 14:54:49] [debug] [Backend] - Segger dll version 6.84.a loaded.
[2020-Nov-10 14:54:49] [debug] [ nRF0x0] - enum_emu_snr
[2020-Nov-10 14:54:49] [debug] [nRF530x0] - enum_emu_snr
[2020-Nov-10 14:54:49] [debug] [Backend] - is_connected_to_emu
[2020-Nov-10 14:54:49] [debug] [Backend] - enum_emu_snr
[2020-Nov-10 14:54:49] [debug] [Backend] - ---just_enum_emu_snr
[2020-Nov-10 14:54:49] [debug] [Backend] - ---just_get_num_emus
[2020-Nov-10 14:54:49] [debug] [Backend] - is_connected_to_emu
[2020-Nov-10 14:54:49] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2020-Nov-10 14:54:49] [debug] [nRF530x0] - connect_to_emu_with_snr
[2020-Nov-10 14:54:49] [debug] [Backend] - is_connected_to_emu
[2020-Nov-10 14:54:49] [debug] [Backend] - connect_to_emu_with_snr
[2020-Nov-10 14:54:49] [debug] [Backend] - is_connected_to_emu
[2020-Nov-10 14:54:49] [debug] [Backend] - ---just_enum_emu_snr
[2020-Nov-10 14:54:49] [debug] [Backend] - ---just_get_num_emus
[2020-Nov-10 14:54:50] [debug] [Backend] - ---just_connect_to_emu_with_snr
[2020-Nov-10 14:54:50] [debug] [Backend] - ---just_connect_to_emu_without_snr
[2020-Nov-10 14:54:50] [debug] [Backend] - Segger logging enabled.
[2020-Nov-10 14:54:51] [debug] [Backend] - JLinkARM.dll Open returned error 'Cannot connect to J-Link.'
[2020-Nov-10 14:54:51] [debug] [Backend] - is_connected_to_emu
[2020-Nov-10 14:54:51] [debug] [ nRF0x0] - close_dll
[2020-Nov-10 14:54:51] [debug] [nRF530x0] - close
[2020-Nov-10 14:54:51] [debug] [Backend] - is_connected_to_emu
[2020-Nov-10 14:54:51] [debug] [Backend] - close
[2020-Nov-10 14:54:51] [debug] [Backend] - disconnect_from_emu
[2020-Nov-10 14:54:51] [debug] [Backend] - is_connected_to_emu
[2020-Nov-10 14:54:51] [debug] [Backend] - Segger Backend closed.
[2020-Nov-10 14:54:51] [debug] [nRF530x0] - nRF family DLL closed

Sometimes there is another problem when I try to flash the hex files from this post (https://devzone.nordicsemi.com/f/nordic-q-a/57931/nrf5340-pdk-not-advertising)...

trunidom@trunidom-IdeaPad-5-15IIL05:~/Downloads/Peripheral_Heart_Rate$ nrfjprog -f NRF53 --program hci_open_amp.hex –-chiperase --log
Parsing hex file.
ERROR: The file specified is not a valid hex file, has data outside valid areas
ERROR: or does not have data in valid areas.

Thanks for your support!

Regards

trunidom

Parents Reply Children
No Data
Related