Taiyo Yuden BLE EVK : Toggling GPIOs , explains and gives insights on basic configuration, setting up and toggling GPIOs by interacting with MPU core of Taiyo Yuden Bluetooth Low Energy EYSNSNZWW Evaluation Kit . This blog will be all about configuring, setting up and wirelessly controlling LED over BLE. For this, I downloaded the following software tools.
- Segger Embedded Studio V5.10.
- Nordic Semi nRF52 SDK with Soft Device 12,13.
- nRF Toolbox Android Application
- nRF Blinky Android Application
Taiyo Yuden EYSNSNZWW comes with ARM Cortex M4 32bit processor and 192KB Flash + 24KB RAM having SPI, UART, I2C, PDM and 12bit ADC GPIO interphases. It is also integrated with Bluetooth 5.2 totally said to be Nordic nRF52811 / ARM Cortex-M4 32-bit processor.
To control the LED over BLE, access to the processor core layer and soft device must be implemented (used Soft Device 12). First, I connected debugger to BLE module with SWD cable. Then on, USB interphase to the computer running Segger Embedded IDE. With connections being planned, I interphased LED to GPIO 17 and Pushbutton to GPIO 14 which is pulled up with 4K7 resistor.
Now, in Segger Studio go to "File" >> "Open Solution" to open sample project from nRF52 SDK at "<location>" >> "examples" >> "ble_peripheral" >> "PCA10040e" >> "s112" >> "ses" >> "ble_app_blinky". Sample projects are made for Nordic development boards which supports Taiyo Yuden BLE kit too with some modifications since they have same nRF5281x core. (files are also attached below)
This image depicts what exactly are we doing and why?
There is a processor module in the base which is just like MCU can be barely operated by simple C programming. To operate Bluetooth Low Energy, a separate stack is placed above so called SoftDevice (SD) which performs authentication, crypto, connectivity and some backend operations for Bluetooth protocol. Here, I am using the s12 version. Moving on,
This being opened, there are some modifications to be done in order to support Taiyo Yuden EYSNSNZWW. Go to "sdk_config.h" in the left file-navigation window and change the clock configuration. By default, the firmware is configured to 32kHz external crystal oscillator(XTAL) which is not actually present in this module. Following is the updated image with clock values set as per.
Next step is to configure the LED and Switch pins which again, come by default as per Nordic BLE development Kit. If respective modifications are done as shown in the below image, it's done program is ready to build.
But why?
There is a small anomaly in pin definitions of nRF BLE and Taiyo Yuden BLE. In firmware, LED Pin declaration number starts from LED1, LED2, LED3 and Button1, Button2,......etc which is as LED0, LED1, LED2 and Button0, Button1,...etc for Taiyo Yuden modules. This is a major point to be noted because of which you can save a few hours in figuring out stuff( I spent an hour though )
Pin configuration documentation is as follows :
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf52832_dk%2FUG%2Fnrf52_DK%2Fintro.html
All these being done, its time to build.
Built? Upload and its done. The module must start streaming BLE and accessing the nRF Toolkit app, the connection can be established through which wireless control works!
Here is a quick video on working. Hope this will encapsulate things.
* sorry for the wiggles and degraded quality. I hope this helps always.
P.S: This post is subjected to change and have a timely update. Do let me know for improvements and suggestions in the comments.
Cheers!!!
Happy Making.
Top Comments