@neverdie No, device only.
But another thought: This thing has USB, NFC, an AES and SHA accelerator, secure storage, secure boot, random number generator, and Bluetooth.
So it would make a nice USB/NFC/Bluetooth FIDO/U2F security key!
@neverdie No, device only.
But another thought: This thing has USB, NFC, an AES and SHA accelerator, secure storage, secure boot, random number generator, and Bluetooth.
So it would make a nice USB/NFC/Bluetooth FIDO/U2F security key!
In this example from Nordic, they're using the RTC's compare interrupt:
http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52%2Fdita%2Fnrf52%2Fapp_example%2Fsolar_beacon%2Fintroduction.html
Average current consumption is 19µA, including sensor reading, data transmission and Bluetooth advertizing.
Not too bad, I'd say.
@Mike_Lemo
This sounds more like an EMC issue.
The connected ST Link filters some disturbance at the i2c lines, and when it's not connected, the disturbance corrupts the signals.
Try connecting capacitors from the i2c lines to ground. I'd start with 100pF each.
May also be a power supply issue. Did you connect the st-link's 3.3V line to the board?
@NeverDie
Exactly. There are two pads labelled SWD and SWC, originally meant for pogo pins.
I patched them with wires to the pin header.
Programming with a Chinese STLink V2 clone works flawlessly.
@NeverDie said in nRF5 Bluetooth action!:
It actually does extend range. Not as well as I had hoped, but better than this high gain antenna, which I also received today and which, in comparison, I would call little better than a placebo:
https://www.amazon.com/gp/product/B073SWWMRG/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1
Those 2.4GHz pseudo stocked dipole antennas have always been crap.
Even if they had 9dBi, they'd lose most of it because of the thin lossy cables.
Never combine a high gain antenna with a long cheap cable, it's a waste of money.
Most better patch antennas work quite well, as do parabolic and backfire types.
I have a 16dBi patch antenna, that works amazingly well. I can, from inside the house, see WiFi APs that are kilometers away.
If you're on a budget, build a cantenna. If not, buy a not too cheap patch antenna.
@NeverDie The datasheet is here: http://www.freqchina.com/plus/view.php?aid=1083
(Click on the "Data" tab.)
@NeverDie It isn't possible to crimp a thicker wire to a U.FL connector.
Therefore you have to use a thin cable, but keep it as short as possible.
There are thin cables with lower loss, but they tend to be very expensive.
@NeverDie For a development board, it could be interesting to drive LEDs with P0.20 and P0.24, because they'll show you exactly when the board sends or receives.
One must be aware, that the gain of an antenna doesn't come from a magic amplification, but from direction.
Meaning, the higher the gain of an antenna is, the more directional it is.
For a sensor, let's say a window switch, that may end up in every mounting position you might imagine, this is NOT what you want.
Neither do you want that for the gateway, that may be in the middle of the house, and should be able to receive transmissions from all directions.
@neverdie
In fact it can.
Adafruit has a build of their Circuitpython (Micropython fork) for the nrf52832, and there's already an early alpha for the nrf52840.
As the 52840 has native USB, they can use Micropython as it was originally intended to be, with a virtual USB drive that contains all the user code files.
@neverdie Speaking of micropython: Adafruits fork of micropython (called circuitpython) now also supports the nRF52840. The also added the nRF52840 dongle as make target (pca10059). After compiling, you can use nRF Connect to flash the hex file to the dongle, via the stock USB DFU bootloader, so you don't need an extra programmer.
I like that dongle, it's cheap yet powerful, and it may be the smallest micropython-capable board with native USB. Native USB is nice, because in this case it has not only a serial REPL, but also a virtual drive with the code files, like the original pyboard.
@neverdie There are three ways to manipulate registers directly from Micropython:
Use machine.mem16
Use the decorator @micropython_viper
The Viper code emitter implements integer types and pointers, allowing to access memory and registers directly.
Use the decorator @micropython.asm_thumb
Write your code in ARM assembler.
Problem: I don't know whether any of this is already implemented and works reliably in Micropython for nRF.
@NeverDie said in nRF5 Bluetooth action!:
EVENTS_TICK
From the datasheet:
15.6 Events
Events are used to notify peripherals and the CPU about events that have happened, for example, a state
change in a peripheral. A peripheral may generate multiple events with each event having a separate
register in that peripheral’s event register group.
An event is generated when the peripheral itself toggles the corresponding event signal, and the event
register is updated to reflect that the event has been generated. See Figure 10: Tasks, events, shortcuts,
and interrupts on page 68. An event register is only cleared when firmware writes a '0' to it.
Events can be generated by the peripheral even when the event register is set to '1'.
Maybe I don't get the problem here, but the way I see it, you have to actively write a '0' to the event register to clear it, but in fact it shouldn't matter, because the timer can nevertheless generate an event.