nRF52832 Current Draw, Deep-Sleep modes and C Command-line programming process

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dwrrehman
 
Posts: 1
Joined: Fri Sep 16, 2022 9:54 pm

nRF52832 Current Draw, Deep-Sleep modes and C Command-line programming process

Post by dwrrehman »

Hi Adafruit Forums,

I recently purchased the nRF52832 Feather board, for use as a Bluetooth Low-Energy HID peripheral in a tapping/accelerometer-based keyboard input device. I have enjoyed programming it so far using the Arduino IDE, although I had a few questions regarding the hardware and programming system for the device:

1. Software: Is it possible to program the nRF52832 Feather board (over USB) but not use Python or Arduino? e.g., in C, via the command-line using an editor such as Vim and a toolchain such as clang.

2. Software: If possible, what is the exact process for doing this? The more details about the process you can give the better; I am very experienced with C and low-level programming as well as using cross-compilers, however have not programmed a device over serial/usb via the command-line before.

3. Software: If not possible, Is there a way to access the low-power/deep-sleep modes of the nRF52832 chip from within Arduino or Circuit-Python?

4. Hardware: Is there anything on the board that would increase the current consumption of the board besides the nRF52832 module itself?

5. Hardware: Also, do you have any power/current measurements of nRF52832 Feather board available, besides what is listed in the chip's datasheet?

6. Hardware: what happens to the nRF52832 Feather board if the power(3.3v) and ground pins are shorted while on battery power? (In case it destroys the board/battery, I did not want to test it out myself!)

The keyboard-input device is wrist mounted-- the battery is tiny, and minimizing current consumption and maximizing use of deep-sleep modes is critical for my project.

I greatly appreciate your time and any information you can give me about these questions!

User avatar
jevada
 
Posts: 194
Joined: Fri Dec 15, 2017 5:29 am

Re: nRF52832 Current Draw, Deep-Sleep modes and C Command-line programming process

Post by jevada »

1) The Arduino IDE uses a commandline tool to talk to the bootloader on the feather. So, yeah, you can program the thing from the commandline. Your best bet would be to use GCC, gcc arm noneabi should do it. However, you will need to make sure your program won't conflict with the bootloader, so you'll need to think carefully about the linker setup. Alternatively, download and use segger's Embedded Studio. You'll need to change the linker script there too though.

Best option: solder a header on the debug port and use a J-Link. You can use the segger toolchain or go really, really fancy and use the nRF Connect tools with Zephyr (just because you can...). Instead of an (expensive) J-Link, you can also use the nrf52832-DK. It features a (slightly limited) J-Link on-board which also allows you to program external nrf52832's with.

2) See (a).

3) Sure. Under the hood, the Adafruit library just makes calls to the SDK but you can also program it on register level.

4) Yep, there's the cp210x UART to USB bridge that takes quite some power.

5) There's the power estimator from nordic that'lll give you some idea.

6) Dunno, you'll have to look at the schematics for that and find that out yourself.

Anyway, I guess the adafruit feather is okay for early prototyping. Did you consider the nrf52840 boards too? They don't have the cp210x (native USB on the '840), so it may be easier to get them down in power consumption.

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”