An NRF52832 with an ILI9341 display

The NRF52832 is a Bluetooth microcontroller from Nordic Semiconductor. Boards and modules based on it are available from a number of different suppliers. I got a few on Aliexpress that bear the Ebyte logo. These were pre-programmed (and locked) with a software image from Ebyte. As I planned writing my own code I had to first unlock the device. Normally I work with an STLink debugger (clone) but this is apparently not able to unlock the NRF52832. Fortunately I had previously bought a J-Link Edu probe and this able to unlock the module.

The next hurdle was to figure out which pin is which as the board labels are specific to some other application. With a bit of fishing around datasheets and poking with a multimeter I came up with this:

The pin numbers could now be related to port numbers in the NRF52832.

Next the device had to be connected up to the ILI9341 display module. This too was bought on AliExpress. It is an SPI device that includes a touch screen controller. The wiring to the NRF52832 module is as follows:

ili9341NRF52832Remarks
T_IRQP0_40 if screen is touched
T_DOP0_26MISO
T_DINP0_25MOSI
T_CSP0_5Chip select for touch interface (active low)
T_CLKP0_27SPI clock
SDO (MISO)N/C
LEDVia 10 ohm resistor to ground
SCKP0_27SPI clock
SDI (MOSI)P0_25MOSI
D/CP0_6Switches between data and command mode (0=Command mode)
RESETP0_7Clear to 0 to reset the display
CSP0_28Chip select for display (active low)
GND0V
VCC3.3V

MBed and Visual Studio Code / PlatformIO were used to write code for the device. Initially Mbed was used but it can be slow at certain times of the day so I switched to VSC/PlatformIO for local development. This was a little fiddly to set up but it worked out very well in the end. MBed OS was used as a basis for the code and a working demo is available over here.

Mbed does not have a board support library for this specific board however the DELTA DFBM-NQ620 board uses the same NRF52832 module and works fine.

There were a couple issues along the way:

The NRF52832 has a maximum SPI speed of 8MHz which is a little slow for a display like this.

The Touch screen controller does not work well with the 8MHz SPI clock rate so this is switched down to 2MHz temporarily when reading the touch interface.

The rats-nest final system is shown below.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s