h2zero / n-able-arduino Goto Github PK
View Code? Open in Web Editor NEWAn arduino core for ARM based BLE devices supported by the NimBLE stack.
License: GNU Lesser General Public License v2.1
An arduino core for ARM based BLE devices supported by the NimBLE stack.
License: GNU Lesser General Public License v2.1
I tried to build for feather ntf52832 with the following configuration but cannot build.
[env:n-able]
platform = https://github.com/h2zero/platform-n-able.git
framework = arduino
board = adafruit_feather_nrf52832
Logs
Processing n-able (platform: https://github.com/h2zero/platform-n-able.git; framework: arduino; board: adafruit_feather_nrf52832)
---------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/n-able/adafruit_feather_nrf52832.html
PLATFORM: n-able (1.0.0+sha.79f9fef) > Adafruit Bluefruit nRF52832 Feather
HARDWARE: NRF52832_XXAA 64MHz, 64KB RAM, 496KB Flash
DEBUG: Current (blackmagic) External (blackmagic, cmsis-dap, jlink, stlink)
PACKAGES:
- framework-n-able-arduino @ 0.1.0+sha.a6263a7
- tool-adafruit-nrfutil @ 1.503.0 (5.3)
- tool-sreccat @ 1.164.0 (1.64)
- toolchain-gccarmnoneeabi @ 1.90301.200702 (9.3.1)
Error. Board type requires board_bootloader to be specified
====================================== [FAILED] Took 0.73 seconds
Is there any idea to resolve the error?
Hi,
asking this here first as it is part of the library but I know its more of a platform issue.
I store several values in EEPROM, sometimes after a restart the values are read but set as 0. Then after a subsequent restart the values are back again.
To put:
EEPROM.begin();
EEPROM.put(0, value);
To get:
EEPROM.begin();
EEPROM.get(0, value);
I am wondering if the library may require an update from original branch (which I am unsure how to do) or if this is a know bug. If you can help on either then that will appreciated.
What is the command to enter sleep mode for NRF52840 so that the MCU wakes from interrupt pin?
Thanks!
I am trying use a build_op.h file with latest version PlatformIO on MacOS, but it does not appear to be processing that file.
I created a build_op.h file with the following contents in my sketch folder:
'-DCONFIG_WDT_TIMEOUT_SECONDS=0'
But the watchdog timer is not disabled. Adding that same switch to the "build_flags =" line in the .platformio.ini file works as expected (i.e. the watchdog timer is disabled).
What am I doing wrong?
n-able core version = 1.0.0
NimBLE-Arduino version = 1.4.1
platformio.ini config:
platform = https://github.com/h2zero/platform-n-able.git#1.0.0
framework = arduino
lib_deps = h2zero/NimBLE-Arduino@^1.4.0
upload_protocol = jlink
board = generic_nrf52840
debug_tool = jlink
Using NimBLEDevice::setPower(int dbm) seems to not change the tx power from what I can tell.
Iterating through the following dbm values shows no change using LightBlue to read RSSI:
{RADIO_TXPOWER_TXPOWER_Neg4dBm, RADIO_TXPOWER_TXPOWER_0dBm, RADIO_TXPOWER_TXPOWER_Pos3dBm, RADIO_TXPOWER_TXPOWER_Pos4dBm}
Reading RSSI on LightBlue app shows no change between all four settings
The workaround I have used so far is changing nimconfig MYNEWT_VAL_BLE_LL_TX_PWR_DBM=0
to -MYNEWT_VAL_BLE_LL_TX_PWR_DBM=4
with platformio build flag build_flags = -DMYNEWT_VAL_BLE_LL_TX_PWR_DBM=4
Reading RSSI on LightBlue shows immediate change after device is flashed with new config
Add https://h2zero.github.io/n-able-Arduino/package_n-able_boards_index.json as an "Additional Board Manager URL"
This returns a 404 error
I added this as a new framework to the Platformio registry (also the n-able platform) at the same time of the first release (3 days ago), not sure why it's not yet available (maybe @ivankravets, could comment)?
In the meantime to use this with Platformio you'll need to setup your environment as follows:
[env]
platform = https://github.com/h2zero/platform-n-able.git#1.0.0
framework = arduino
board = ...
...
Hello. Thank you for this library.
I need help with deep sleep with board nrf51822.
Now for example "delay(5000);" get me about 0.8-0.9 mA.
Is this maximum mA for sleep mode?
I get the following linker error when attempting to compile for a micro:bit V2:
/Users/johnmaloney/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: error: .pio/build/nable/firmware.elf uses VFP register arguments, .pio/build/nable/libFrameworkArduino.a(pulse_asm.S.o) does not
Here's my platformio.ini file entry:
[env:nable]
platform = https://github.com/h2zero/platform-n-able.git#1.0.0
framework = arduino
lib_deps = h2zero/NimBLE-Arduino@^1.4.0
board = BBCmicrobitV2
build_flags = -mfloat-abi=softfp
I added the "-mfloat-abi=softfp" in attempt to force it to use sofware floating point that did not help.
I have a device with a nrf51802.
just calling anything under 10ms (even with the simplest form with delay(9) in the main loop) will make a few iteration and crash. funnily calling a delayMicrosecond(100000) will also crash it.
I don't intent to use "delays" actually, but even the freertos example crash or any millis() usage.
Is there anything I can do to debug this?
I don't have serial on this board and use RTT... unfortunately here on an higher level, so I'm not sure to be able to check anything there :)
*I succeeded to root it narrower. seems t be the watchdog triggering (error 2) ... tried to disable it, but it doesn't change anything unfortunately.
When compiling a simple blinky fails with :
echo Not building DFU package
exit status -1073741515
Error compiling for board Nordic nRF52832DK (PCA10040).
When compiling with NIM-BLE app fails with :
exit status 0xc0000135
Compilation error: exit status 0xc0000135
Hi,
I'm currently struggling to burn the provided Adafruit bootloader to a Feather Sense (nRF52840).
Following the instructions and selecting Burn Bootloader
from the Tools menu results in the following error:
xPack OpenOCD x86_64 Open On-Chip Debugger 0.11.0+dev (2022-03-25-17:32)
Error while burning bootloader.
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 0
embedded:startup.tcl:26: Error: Can't find interface/.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 26
The programmer is set to adafruit-nrfutil
and the device is connected via USB.
Is there an option to burn your provided bootloader without using special programmer hardware?
For instance, something such as Adafruit's Bootloader DFU for Bluefruit nRF52
programmer?
I'm currently using the Adafruit Softdevice enabled bootloader v0.7.0 and am therefore unable to upload sketches without soft-bricking the board.
is there a working OTA DFU Example?
If anyone would like to help build this up for a release please comment in this issue thread.
Todo:
I'm using n-able-Arduino and NimBLE on a micro:bit v2.
My application allows the user to open and close the USB serial port to communication with the board. With the board connected to the computer via a USB cable, I can connect and communicate with it over the serial port. However, when I close the serial port, the board does a soft reset. (_resetReason, which is read from NRF_POWER->RESETREAS at startup, is 4.)
I'd like it to simply continue running when the serial port is closed, as it does when I use Earle Philhower's Arduino framework.
I don't think it is the watchdog timer. I have that disabled and, anyhow, that would give a different reset reason.
Is some event my application should be handling? Other ideas?
Hello, I'm able to build and upload zephyr based platformio project via BlackMagic. I was trying your stack for BLE developing. Everything seems to work as configuration and build but when I try to upload I got:
Configuring upload protocol...
AVAILABLE: adafruit-nrfutil, blackmagic, cmsis-dap, jlink, nrfjprog, stlink
CURRENT: upload_protocol = blackmagic
Looking for BlackMagic port...
Auto-detected: /dev/cu.usbmodem79A67BCB1
Uploading .pio/build/adafruit_feather_nrf52840/firmware.hex
monitor swdp_scan: No such file or directory.
"/Users/azlekov/Documents/PlatformIO/Projects/dodi-noise-c/.pio/build/adafruit_feather_nrf52840/firmware.elf" is not a core dump: file format not recognized
Undefined command: "-ex". Try "help".
Don't know how to attach. Try "help target".
No executable file specified.
Use the "file" or "exec-file" command.
command cannot be used without an exec file
The program is not being run.
*** [upload] Error 1
The board is Adafruit Feather nrf52480 Express
Any ideas?
I am having a problem with the Adafruit Feather nRF52840 Express board (it extends to all Adafruit nRF52840 boards).
When compiling any sketch, even an empty sketch, I get the many errors from the TinyUSB library in the dcd_nrf5x.c
file.
As far as I could figure it out, constants of the nordic library, more specific the in files "nrf52840.h" and "nrf52840_bitfields.h", cant be found within dcd_nrf5x.c
.
These are the error messages:
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:50:32: error: 'USBD_INTEN_ENDEPIN0_Pos' undeclared here (not in a function)
50 | EDPT_END_ALL_MASK = (0xff << USBD_INTEN_ENDEPIN0_Pos) | (0xff << USBD_INTEN_ENDEPOUT0_Pos) |
| ^~~~~~~~~~~~~~~~~~~~~~~
"C:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\tools\\gcc-arm-none-eabi\\9.3.1-1/bin/arm-none-eabi-gcc" -mcpu=cortex-m4 -mthumb -c -g -Os -w -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wno-unused-parameter -Wno-sign-compare -Wno-old-style-declaration -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD -DF_CPU=64000000 -DARDUINO=10819 -DARDUINO_NRF52840_FEATHER -DNRF52_SERIES -DNRF52832_XXAA -DUSE_ADA_BL -DUSBCON -DUSE_TINYUSB -DUSB_VID=0x239A -DUSB_PID=0x8029 "-DUSB_MANUFACTURER=\"Adafruit\"" "-DUSB_PRODUCT=\"Feather nRF52840 Express\"" -DCONFIG_NIMBLE_CPP_LOG_LEVEL=0 -DNRF5 -DARDUINO_ARCH_NRF5 "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5/nimble_config" "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5/nordic/nrfx" "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5/nordic/nrfx/hal" "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5/nordic/nrfx/mdk" "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5/nordic/nrfx/soc" "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5/nordic/nrfx/drivers/include" "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5/nordic/nrfx/drivers/src" "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5/CMSIS/Include" "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5/FC_Store" "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5/BLEBond_nvs" "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5/TinyUSB" "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -DUSE_LFXO "@C:\\Users\\Dylan\\AppData\\Local\\Temp\\arduino_build_521375/build.opt" "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5" "-IC:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\variants\\feather_nrf52840_express" "C:\\Users\\Dylan\\AppData\\Local\\Arduino15\\packages\\h2zero\\hardware\\arm-ble\\0.1.0\\cores\\nRF5\\nordic\\nrfx\\mdk\\system_nrf52840.c" -o "C:\\Users\\Dylan\\AppData\\Local\\Temp\\arduino_build_521375\\core\\nordic\\nrfx\\mdk\\system_nrf52840.c.o"C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:50:68: error: 'USBD_INTEN_ENDEPOUT0_Pos' undeclared here (not in a function)
50 | EDPT_END_ALL_MASK = (0xff << USBD_INTEN_ENDEPIN0_Pos) | (0xff << USBD_INTEN_ENDEPOUT0_Pos) |
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:51:23: error: 'USBD_INTENCLR_ENDISOIN_Msk' undeclared here (not in a function); did you mean 'CCM_INTENCLR_ENDKSGEN_Msk'?
51 | USBD_INTENCLR_ENDISOIN_Msk | USBD_INTEN_ENDISOOUT_Msk
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| CCM_INTENCLR_ENDKSGEN_Msk
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:51:52: error: 'USBD_INTEN_ENDISOOUT_Msk' undeclared here (not in a function)
51 | USBD_INTENCLR_ENDISOIN_Msk | USBD_INTEN_ENDISOOUT_Msk
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'edpt_dma_start':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:119:50: error: 'USBD_IRQn' undeclared (first use in this function); did you mean 'ECB_IRQn'?
119 | if ( __get_PRIMASK() || !NVIC_GetEnableIRQ(USBD_IRQn) )
| ^~~~~~~~~
| ECB_IRQn
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:119:50: note: each undeclared identifier is reported only once for each function it appears in
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:127:19: error: 'NRF_USBD' undeclared (first use in this function)
127 | ended = NRF_USBD->EVENTS_ENDISOIN + NRF_USBD->EVENTS_ENDISOOUT;
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'xact_out_prepare':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:170:5: error: 'NRF_USBD' undeclared (first use in this function)
170 | NRF_USBD->TASKS_EP0RCVOUT = 1;
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'xact_out_dma':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:187:28: error: 'NRF_USBD' undeclared (first use in this function)
187 | uint8_t const xact_len = NRF_USBD->SIZE.EPOUT[epnum];
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'xact_in_prepare':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:210:3: error: 'NRF_USBD' undeclared (first use in this function)
210 | NRF_USBD->EPIN[epnum].PTR = (uint32_t) xfer->buffer;
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'dcd_int_enable':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:229:18: error: 'USBD_IRQn' undeclared (first use in this function); did you mean 'ECB_IRQn'?
229 | NVIC_EnableIRQ(USBD_IRQn);
| ^~~~~~~~~
| ECB_IRQn
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'dcd_int_disable':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:235:19: error: 'USBD_IRQn' undeclared (first use in this function); did you mean 'ECB_IRQn'?
235 | NVIC_DisableIRQ(USBD_IRQn);
| ^~~~~~~~~
| ECB_IRQn
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'dcd_set_address':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:248:3: error: 'NRF_USBD' undeclared (first use in this function)
248 | NRF_USBD->EVENTCAUSE |= NRF_USBD->EVENTCAUSE;
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:251:24: error: 'USBD_INTEN_USBEVENT_Msk' undeclared (first use in this function)
251 | NRF_USBD->INTENSET = USBD_INTEN_USBEVENT_Msk;
| ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'dcd_remote_wakeup':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:259:3: error: 'NRF_USBD' undeclared (first use in this function)
259 | NRF_USBD->LOWPOWER = 0;
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:262:25: error: 'USBD_DPDMVALUE_STATE_Resume' undeclared (first use in this function)
262 | NRF_USBD->DPDMVALUE = USBD_DPDMVALUE_STATE_Resume;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'dcd_disconnect':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:273:3: error: 'NRF_USBD' undeclared (first use in this function)
273 | NRF_USBD->USBPULLUP = 0;
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'dcd_connect':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:284:3: error: 'NRF_USBD' undeclared (first use in this function)
284 | NRF_USBD->USBPULLUP = 1;
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'dcd_edpt_open':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:301:5: error: 'NRF_USBD' undeclared (first use in this function)
301 | NRF_USBD->INTENSET = TU_BIT(USBD_INTEN_ENDEPOUT0_Pos + epnum);
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'dcd_edpt_xfer':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:327:85: error: 'NRF_USBD' undeclared (first use in this function)
327 | bool const control_status = (epnum == 0 && total_bytes == 0 && dir != tu_edpt_dir(NRF_USBD->BMREQUESTTYPE));
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'dcd_edpt_stall':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:367:5: error: 'NRF_USBD' undeclared (first use in this function)
367 | NRF_USBD->TASKS_EP0STALL = 1;
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:370:26: error: 'USBD_EPSTALL_STALL_Stall' undeclared (first use in this function)
370 | NRF_USBD->EPSTALL = (USBD_EPSTALL_STALL_Stall << USBD_EPSTALL_STALL_Pos) | ep_addr;
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:370:54: error: 'USBD_EPSTALL_STALL_Pos' undeclared (first use in this function)
370 | NRF_USBD->EPSTALL = (USBD_EPSTALL_STALL_Stall << USBD_EPSTALL_STALL_Pos) | ep_addr;
| ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'dcd_edpt_clear_stall':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:383:5: error: 'NRF_USBD' undeclared (first use in this function)
383 | NRF_USBD->EPSTALL = (USBD_EPSTALL_STALL_UnStall << USBD_EPSTALL_STALL_Pos) | ep_addr;
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:383:26: error: 'USBD_EPSTALL_STALL_UnStall' undeclared (first use in this function)
383 | NRF_USBD->EPSTALL = (USBD_EPSTALL_STALL_UnStall << USBD_EPSTALL_STALL_Pos) | ep_addr;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:383:56: error: 'USBD_EPSTALL_STALL_Pos' undeclared (first use in this function)
383 | NRF_USBD->EPSTALL = (USBD_EPSTALL_STALL_UnStall << USBD_EPSTALL_STALL_Pos) | ep_addr;
| ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:386:26: error: 'USBD_DTOGGLE_VALUE_Data0' undeclared (first use in this function)
386 | NRF_USBD->DTOGGLE = (USBD_DTOGGLE_VALUE_Data0 << USBD_DTOGGLE_VALUE_Pos) | ep_addr;
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:386:54: error: 'USBD_DTOGGLE_VALUE_Pos' undeclared (first use in this function)
386 | NRF_USBD->DTOGGLE = (USBD_DTOGGLE_VALUE_Data0 << USBD_DTOGGLE_VALUE_Pos) | ep_addr;
| ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'bus_reset':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:399:5: error: 'NRF_USBD' undeclared (first use in this function)
399 | NRF_USBD->TASKS_STARTEPIN[i] = 0;
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'dcd_int_handler':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:415:27: error: 'NRF_USBD' undeclared (first use in this function)
415 | uint32_t const inten = NRF_USBD->INTEN;
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:420:22: error: 'USBD_INTEN_EPDATA_Pos' undeclared (first use in this function); did you mean 'NFCT_INTEN_ENDTX_Pos'?
420 | for(uint8_t i=0; i<USBD_INTEN_EPDATA_Pos+1; i++)
| ^~~~~~~~~~~~~~~~~~~~~
| NFCT_INTEN_ENDTX_Pos
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:432:21: error: 'USBD_INTEN_USBRESET_Msk' undeclared (first use in this function)
432 | if ( int_status & USBD_INTEN_USBRESET_Msk )
| ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:438:21: error: 'USBD_INTEN_SOF_Msk' undeclared (first use in this function)
438 | if ( int_status & USBD_INTEN_SOF_Msk )
| ^~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:443:21: error: 'USBD_INTEN_USBEVENT_Msk' undeclared (first use in this function)
443 | if ( int_status & USBD_INTEN_USBEVENT_Msk )
| ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:445:56: error: 'USBD_EVENTCAUSE_SUSPEND_Msk' undeclared (first use in this function)
445 | uint32_t const evt_cause = NRF_USBD->EVENTCAUSE & (USBD_EVENTCAUSE_SUSPEND_Msk | USBD_EVENTCAUSE_RESUME_Msk);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:445:86: error: 'USBD_EVENTCAUSE_RESUME_Msk' undeclared (first use in this function)
445 | uint32_t const evt_cause = NRF_USBD->EVENTCAUSE & (USBD_EVENTCAUSE_SUSPEND_Msk | USBD_EVENTCAUSE_RESUME_Msk);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:471:21: error: 'USBD_INTEN_EP0SETUP_Msk' undeclared (first use in this function)
471 | if ( int_status & USBD_INTEN_EP0SETUP_Msk )
| ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:550:22: error: 'USBD_INTEN_EPDATA_Msk' undeclared (first use in this function); did you mean 'UARTE_INTEN_ENDTX_Msk'?
550 | if ( int_status & (USBD_INTEN_EPDATA_Msk | USBD_INTEN_EP0DATADONE_Msk) )
| ^~~~~~~~~~~~~~~~~~~~~
| UARTE_INTEN_ENDTX_Msk
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:550:46: error: 'USBD_INTEN_EP0DATADONE_Msk' undeclared (first use in this function)
550 | if ( int_status & (USBD_INTEN_EPDATA_Msk | USBD_INTEN_EP0DATADONE_Msk) )
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c: In function 'tusb_hal_nrf_power_event':
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:710:13: error: 'NRF_USBD' undeclared (first use in this function)
710 | if ( !NRF_USBD->ENABLE )
| ^~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:713:32: error: 'USBD_EVENTCAUSE_READY_Msk' undeclared (first use in this function)
713 | NRF_USBD->EVENTCAUSE = USBD_EVENTCAUSE_READY_Msk;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:807:34: error: 'NRF_USBD_BASE' undeclared (first use in this function); did you mean 'NRF_UICR_BASE'?
807 | *((volatile uint32_t *) (NRF_USBD_BASE + 0x800)) = 0x7E3;
| ^~~~~~~~~~~~~
| NRF_UICR_BASE
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:814:28: error: 'USBD_ISOSPLIT_SPLIT_HalfIN' undeclared (first use in this function)
814 | NRF_USBD->ISOSPLIT = USBD_ISOSPLIT_SPLIT_HalfIN;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:817:28: error: 'USBD_INTEN_USBRESET_Msk' undeclared (first use in this function)
817 | NRF_USBD->INTENSET = USBD_INTEN_USBRESET_Msk | USBD_INTEN_EPDATA_Msk |
| ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:817:54: error: 'USBD_INTEN_EPDATA_Msk' undeclared (first use in this function); did you mean 'UARTE_INTEN_ENDTX_Msk'?
817 | NRF_USBD->INTENSET = USBD_INTEN_USBRESET_Msk | USBD_INTEN_EPDATA_Msk |
| ^~~~~~~~~~~~~~~~~~~~~
| UARTE_INTEN_ENDTX_Msk
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:818:11: error: 'USBD_INTEN_EP0SETUP_Msk' undeclared (first use in this function)
818 | USBD_INTEN_EP0SETUP_Msk | USBD_INTEN_EP0DATADONE_Msk | USBD_INTEN_ENDEPIN0_Msk | USBD_INTEN_ENDEPOUT0_Msk;
| ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:818:37: error: 'USBD_INTEN_EP0DATADONE_Msk' undeclared (first use in this function)
818 | USBD_INTEN_EP0SETUP_Msk | USBD_INTEN_EP0DATADONE_Msk | USBD_INTEN_ENDEPIN0_Msk | USBD_INTEN_ENDEPOUT0_Msk;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:818:66: error: 'USBD_INTEN_ENDEPIN0_Msk' undeclared (first use in this function)
818 | USBD_INTEN_EP0SETUP_Msk | USBD_INTEN_EP0DATADONE_Msk | USBD_INTEN_ENDEPIN0_Msk | USBD_INTEN_ENDEPOUT0_Msk;
| ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:818:92: error: 'USBD_INTEN_ENDEPOUT0_Msk' undeclared (first use in this function)
818 | USBD_INTEN_EP0SETUP_Msk | USBD_INTEN_EP0DATADONE_Msk | USBD_INTEN_ENDEPIN0_Msk | USBD_INTEN_ENDEPOUT0_Msk;
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Dylan\AppData\Local\Arduino15\packages\h2zero\hardware\arm-ble\0.1.0\cores\nRF5\TinyUSB\Adafruit_TinyUSB_ArduinoCore\tinyusb\src\portable\nordic\nrf5x\dcd_nrf5x.c:821:28: error: 'USBD_IRQn' undeclared (first use in this function); did you mean 'ECB_IRQn'?
821 | NVIC_ClearPendingIRQ(USBD_IRQn);
| ^~~~~~~~~
| ECB_IRQn
exit status 1
Error compiling for board Adafruit Feather nRF52840 Express.
Hi there @h2zero - I'm having an issue getting my custom design to connect using NRFconnect. It's odd: all of the other functionality works (GPIO, sleep, i2c) and my BLE server test code works as far as it shows up in advertising but fails to connect. I've tried the same code on a cheap generic development board and it works fine. The schematic is identical minus the 32khz crystal (I'm not using one in my design). Any idea what might be happening here? I'm using a 10ppm 16mhz crystal for the main clock.
Any project which uses std::unordered_map
fails to compile. The error message is extraordinarily long, but starts as:
rom /home/pcook/.arduino15/packages/h2zero/tools/gcc-arm-none-eabi/9.3.1-1/arm-none-eabi/include/c++/9.3.1/bits/hashtable.h:35,
from /home/pcook/.arduino15/packages/h2zero/tools/gcc-arm-none-eabi/9.3.1-1/arm-none-eabi/include/c++/9.3.1/unordered_map:46,
/home/pcook/.arduino15/packages/h2zero/tools/gcc-arm-none-eabi/9.3.1-1/arm-none-eabi/include/c++/9.3.1/limits:1818:7: error: 'constexpr' static data member 'max' must have an initializer
1818 | max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; }
| ^~~
/home/pcook/.arduino15/packages/h2zero/tools/gcc-arm-none-eabi/9.3.1-1/arm-none-eabi/include/c++/9.3.1/limits:1818:7: error: expected ';' at end of member declaration
1818 | max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; }
| ^~~
| ;
I hope this is just something I'm doing wrong. An identical project using the non-n-able core compiles without issue.
Hello,
I'm using BBC microbit v2 and I noticed that the analogRead function always gave us 0 (trying to read from a microphone).
In the file wiring_analog_nRF52.c, in the function analogRead , the variable is set to 0 when initialized.
The solution is to replace the line 109 "int16_t value = 0;" by "int16_t value;"
Then, it solves this issue.
Maybe I should have proposed a PR, but I'm not yet comfortable with that.
Thanks anyway for this library, because sandeepmistry/arduino-nRF5 doesn't support BLE for BBC microbit v2 and you do with NimBLE.
Hey!
Thank you for creating this library!
Can you add support for Nice!Nano V2 Nordic nRF52840 https://nicekeyboards.com/nice-nano?
There are a schematic and a pinout for it: https://nicekeyboards.com/docs/nice-nano/pinout-schematic for both V1 and V2(but only V2 is still commercialized). There is more info here: https://nicekeyboards.com/docs/nice-nano. It is mentioned that the board is using https://github.com/adafruit/Adafruit_nRF52_Bootloader bootloader.
I would gladly help with testing if you decide to add support for it.
Thank you!
Hi ,
I am trying to do the usb-serial dfu of nrf52840 but I am stuck at it. I can do it using the bluefruit library and the USB serial example from the nrf SDK but the hex file from my n-able based code doesn't work it I use it in the serial dfu.
If anyone have any insights on this, any help is much appreciated,
Thanks
Hello
I have a question regarding license, is it possible to use in in commercial product? If so, what are the terms? Dynamic linking would be hard as part of firmware that is pretty much core of application.
I'm trying to compile for a CPX Bluefruit with Platform IO. Here is my platformio.ini file entry:
[env:cplay52]
platform = https://github.com/h2zero/platform-n-able.git#1.0.0
board = adafruit_cplaynrf52840
build_flags = -D CONFIG_WDT_TIMEOUT_SECONDS=0
lib_deps = h2zero/NimBLE-Arduino@^1.4.0
When I try to build I get an error:
Error. Board type requires board_bootloader to be specified
Same problem with the Adafruit Clue.
Thank you!
Board: generic_nrf52840
This is a dumb question. How do I enable the RNG driver (cores/nRF5/nordic/nrfx/drivers/include/nrfx_rng.h)? I have included the driver in my source file. I have added -DNRFX_RNG_ENABLED
to the build_flags in my platformio.ini
Building results in undefined reference to nrfx_rng_init
and undefined reference to nrfx_rng_uninit
My current code:
bool rngGenerated = false;
uint8_t rngNumber;
void rngEventHandler(uint8_t randomNumber)
{
rngGenerated = true;
rngNumber = randomNumber;
}
void generateRandomNumber(uint8_t *dataBuffer, uint8_t bytesToGenerate)
{
uint8_t numbersGenerated = 0;
nrfx_rng_config_t config = NRFX_RNG_DEFAULT_CONFIG;
nrfx_rng_evt_handler_t eventHandler = &rngEventHandler;
nrfx_rng_init(&config, eventHandler);
while (numbersGenerated < bytesToGenerate)
{
if (rngGenerated)
{
dataBuffer[numbersGenerated] = rngNumber;
rngGenerated = false;
numbersGenerated++;
}
delay(1);
}
nrfx_rng_uninit();
}
Any help would be much appreciated :)
Hi,
thanks again for a great library.
I am near the end of my project and realised that I need to implement systemON sleep for faster wakeup.
I know this should be a core function but when I am using the following code:
in my platformio.ini when I declare:
platform = https://github.com/h2zero/platform-n-able.git#1.0.0
The device goes to sleep and then a few seconds later wakes up without any trigger but behaves like a reset (eg runs the code in setup) and does not continue from where it left off.
Could this be an issue with the SDK that is being used?
I notice that when I specify:
build_flags =
-D CONFIG_WDT_TIMEOUT_SECONDS=0
that the board does not restart, but does not wake up either from the assigned interrupt.
when I use Sandeep's version by enabling it works.
platform = nordicnrf52
I also notice that when I click on the NRF_POWER
function it seems to point to nrf51.h - should this not be pointing to nrf52.h like it does when I switch to the platform = nordicnrf52
?
Thanks again for your help.
I am unable to get this to compile for an nrf52810 as it has no floating point unit.
Is it possible to change the freertos to compile without FPU??
I've added an entry for it in Boards.txt and added system_nrf52810.h and .c files to the nrf mdk, but when i select "generic 52810" I get this error:
#error This port can only be used when the project options are configured to enable hardware floating point support
Weirdly, if I select generic nrf51822 as the board then it compiles and runs ok on this nrf52810 custom board, and example code shows that a bluetooth device is available. Should I just use this, or will all the pins and interrupts be wrong?
This post gives a solution but asm format is different and mighty confusing! https://devzone.nordicsemi.com/f/nordic-q-a/30103/freertos-on-nrf52810
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.