Any 'generic' nrf52832 board?

I would like to start programming nrf52832 boards and modules. Is there a generic board configuration I can use? If not, do I need to create one? How?

I plan to start with this board https://www.amazon.com/gp/product/B081GX1FK7 and also with this bare module https://www.amazon.com/gp/product/B081GYNM2G

Adafruit Bluefruit nRF52832 is supported by PlatformIO, so you should be able to use the same board package with a few minor changes for the GPIO pins.

In addition, Zephyr RTOS support for nRF52832 exists in PlatformIO.

Thanks @zpm1066, how do I do ‘minor changes for the GPIO pins’? Just define an use my own constants or do I also need to change board initialization code or other library functionality?

Also, this is I guess a question for the Platformio people here. When I used STM32 I remember using generic boards such as the one below. Will it be possible to add also a similar generic board definition for the nrf52832? It will support design of custom boards.

https://docs.platformio.org/en/latest//boards/ststm32/genericSTM32F103CB.html#board-ststm32-genericstm32f103cb

Take a look at the Arduino board package and/or Zephyr devicetree for one of the nRF52832 boards. You may be able to use one as is or may need to change the PIN numbers (for SPI, I2C, etc) to match your custom board.

I haven’t done a custom board from scratch, only modified a “Generic nRF5” (nRF51802) board for a custom nRF51802 board. It worked fine for most functions (GPIO, I2C, SPI) that I tried.

https://community.platformio.org/t/how-to-re-purpose-a-nrf51802-board-as-platformio-arduino-for-development/18627

Curious - Any particular reason you’re using a nRF52832 and not nRF52840 or nRF52833?

Arduino:
macOS - variant.h / variant.cpp in 
/Users/<username>/.platformio/packages/framework-arduinoadafruitnrf52/variants/feather_nrf52832 
Zephyr RTOS:

for example, one of the nrf52832 boards, 
/zephyr/boards/arm/nrf52832_mdk/nrf52832_mdk.dts

Zephyr Board Porting Guide:
https://docs.zephyrproject.org/latest/guides/porting/board_porting.html?highlight=nrf52832

@zpm1066, it seems that you went through a similar journey but with a different MCU. If I create a custom json board file can I keep it in my project directory or does it have to reside in platformio managed directory? If in a platformio directory, did you manage to get your file accepted by platformio?

As your your question about MCU selection. I am new to Nordic so looked at the product comparison, looked what is common/available in the market and ended up with nrf52832 as the minimal MCU that, I think, has all the resources I need. My goal is to build something similar to this GitHub - zapta/simple_stepper_motor_analyzer: A DYI stepper motor analyzer. This is a new design that is based on Raspberry Pi Pico and users a compact single PCB design. NOTE: The legacy STM32 based stepper analyzer was moved to this repository https://github.com/zapta/legacy_stepper_motor_analyzer. but without the display and without the external power feed. It will harvest power from the stepper motor signals and will talk via BLE with some GUI hosted on a phone or a computer. It’s a long shot but I will give it a try. There are all kind of limitations I can hit, e.g. not sure if the Arduino framework provide sufficient access to the peripherals (e.g. need to sample and process a pair of analog input at 100K samples per/sec). I think it will be useful if I could have full access to the Nordic API without dumbing down by Arduino.

You mentioned the Zephyr, never used it before. Does it work with Arduino? Does it work with the Nordic API? Is it efficient?

I kept the json in the platformio managed directory.

You have there a pretty interesting stepper motor analyzer project. Do you plan to build the Pico version, in addition to the Nordic Semi version?

Nordic Semi moved over to using their nRF Connect SDK across all their devices, running Zephyr RTOS together with their extended BLE & cellular stack. Their VSCode extensions are very impressive. They have executed their development superbly. Soon, they will be bringing out new devices with low power WiFi. So, they’ll have low power across cellular, BLE and WiFi. Hopefully we’ll get dev boards from the usual vendors (Adafruit, Sparkfun, etc).

I’ve been using nRF Connect - Zephyr - VSCode for all my nRF52840 development for quite sometime now. I would strongly recommended it plus Zephyr RTOS. You need a RTOS for accurate timings, acquisition of fast signals, and measurements.

I also use PlatformIO + Zephyr for all my devices, especially now that Zephyr is supported on the Raspberry Pi Pico as well.

Arduino uses FreeRTOS underneath their framework. I prefer the Zephyr devicetree model. Very active development and support on it.