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

BLYST Nano Installation and example file

Hello, I am completely new to embedded software development (so far I have been using development boards such as Teensy, Feather and Arduino) and I recently acquired the BLYST Nano Exploration kit that comes with a IDAP-Link CMSIS-DAP Debug JTAG as well as the breakout board. I installed the nRF5 Arduino Core from Sandeep Mistry (https://github.com/sandeepmistry/arduino-nRF5).

When I tried to flash the SoftDevice I initially got an error because s132_nrf52_2.0.1_softdevice.hex was missing. Because GIMF I managed to find it here : https://github.com/Wiznet/nRF52DK_to_W5500Shield/blob/master/s132_nrf52_2.0.1_softdevice.hex then flashing the SoftDevice went ok although there was no licence agreement (step 9 & 10) and I got this message:

Open On-Chip Debugger 0.10.0-dev-gdc53227 (2016-04-09-13:45)
Licensed under GNU GPL v2
For bug reports, read
openocd.org/.../bugs.html
debug_level: 0
adapter speed: 10000 kHz
cortex_m reset_config sysresetreq
Error: nrf52.cpu -- clearing lockup after double fault
Polling target nrf52.cpu failed, trying to reexamine
nrf52.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
auto erase enabled
wrote 315392 bytes from file /Users/uoc/Library/Arduino15/packages/sandeepmistry/hardware/nRF5/0.6.0/cores/nRF5/SDK/components/softdevice/s132/hex/s132_nrf52_2.0.1_softdevice.hex in 21.533291s (14.303 KiB/s)
** Programming Finished **
** Verify Started **
verified 311582 bytes in 0.888097s (342.619 KiB/s)
** Verified OK **
** Resetting Target **
shutdown command invoked

Then I downloaded the BLEPeripheral library (also from Sandeep Mistry : https://github.com/sandeepmistry/arduino-BLEPeripheral). It includes an example file named "Serial" which creates a UART service compatible with the Bluefruit LE app that I have used with my Feather BLE boards. Unfortunately I cannot see anything. No BLE device shows up and there is nothing either in the IDE serial monitor (at 115200 baud) plus no LED is ON on the breakout board. Programming the board looked ok:

Sketch uses 26416 bytes (6%) of program storage space. Maximum is 409600 bytes.
Open On-Chip Debugger 0.10.0-dev-gdc53227 (2016-04-09-13:45)
Licensed under GNU GPL v2
For bug reports, read
openocd.org/.../bugs.html
debug_level: 0
adapter speed: 10000 kHz
cortex_m reset_config sysresetreq
Error: nrf52.cpu -- clearing lockup after double fault
Polling target nrf52.cpu failed, trying to reexamine
nrf52.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 00000000 pc: 0x615c3166 msp: 0x74725c78
** Programming Started **
auto erase enabled
wrote 28672 bytes from file /var/folders/_p/__54lf114_9cpwbvbrvm_q3m0000gr/T/arduino_build_754463/serial.ino.hex in 2.206038s (12.692 KiB/s)
** Programming Finished **
** Verify Started **
verified 26616 bytes in 0.278153s (93.446 KiB/s)
** Verified OK **
** Resetting Target **
shutdown command invoked

Questions:

1) Since the BLYST Nano board is not in the list in Arduino IDE Tools>Boards, I selected "generic nRF52". Is that ok or is there a better driver to use ? 

2) Is the SoftDevice file that I, sort of blindly, downloaded ok ?

3) If the answer to both previous questions is yes then where is the problem ? Why is the BLE device not working ?

Many thanks !

Parents Reply Children
  • Thank you very much for your answers.

    1) I did notice the warning "//custom boards may override default pin definitions with BLESerial(PIN_REQ, PIN_RDY, PIN_RST)" But I didn't see any actual hard-coded pin values, only a reference to "BLE_DEFAULT" in BLESerial.h :

    BLESerial(unsigned char req = BLE_DEFAULT_REQ, unsigned char rdy = BLE_DEFAULT_RDY, unsigned char rst = BLE_DEFAULT_RST);

    What would be the correct pin assignment ? RST seems to be pin 2 i.e. P0.21 but I am not sure about the other two.

    (By the way what would be the proper way to refer to a pin for instance to set its behaviour:  pinMode(P0.27, INPUT) ?)

    2) In a nutshell you do not recommend using Arduino IDE but rather Eclipse (or other) + EHAL, am I right ? 

    Many thanks !

  • 1) Yes, there is only one Reset pin that is shared with P0.21

    All the IO pin on the nRF52832 can use map to any periph with few exceptions such as reset, analog in and NCF are fixed.  All others SPI, I2C,... can be mapped to any pins.

    Pin map number usually refer 27 as P0.27.  Direct mapping to nRF naming.

    The BLYST Nano breakout board assign the UART RX to P0.08 and TX to P0.07.  Which directly connected to the IDAP-Link USB-UART bridge. 

    2) Arduino is not at all recommended for BLE firmware. EHAL or the new IOsonata has BLE wrapper functions over the SDK to make it easy for you to write BLE firmware without the headache.  Eclipse is open and free, that allows you to use any JTag you like.  You can also use the Nordic way but you will be locked in with Segger only, no freedom of choices.  SES has a extremely limited functionality, almost no support for C++.

Related