Recently, I was selected for Taiyo Yuden Bluetooth LE EVK RoadTest which is my first experience! Beginning with big thanks to E14, Taiyo Yuden and all supporters.
From past few hours I have been on Taiyo Yuden Bluetooth LE EVK with fresh hands and came across a lot of troubleshooting steps and debugs. With memory being fresh, I am putting up a day by day update and finally a RoadTest review based on full insights.
This blog will be full of basic getting started things which I followed, starting from 0 to toggling GPIO with, Taiyo Yuden Bluetooth Low Energy EYSNSNZWW Evaluation Kit.
The EVAL KIT has :
- Evaluation Board.
- SEGGER J-link Lite Cortex-M.
- SWD Cable.
- USB Mini A-type Cable.
I downloaded the following software tools
- Segger Embedded Studio V5.10.
- Nordic Semi nRF52 SDK with Soft Devices.
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 GPIO's of BLE module, its enough only to access the processor core layer. First, I connected debugger to BLE module with SWD cable. Then on, USB interphase to the computer running Segger Embedded IDE.
Open Segger Embedded IDE and go to "File" >> "Open Solution" to open sample project from nRF52 SDK. Yes, the sample project is needed to even blink an LED in Taiyo Yuden BLE EYSNSNZWW module. There is a truth behind this. Taiyo Yuden manufactures the smallest BLE modules based on nRF52811 by Nordic Semiconductor. But, their architecture is not completely the same as Nordic's since there are some add ons and peripherals. Neither they have their own IDE nor they completely support nRF5 SDK. With some tradeoffs, this Taiyo Yuden module can be programmed with segger studio using nRF SDK examples. Several support files, libraries come together with nRF52 SDK which makes programming this kit handy. Of course, accessing GPIO's is much easy since no Soft Devices are needed which comes into picture while using BLE feature.
Install "CMSIS-CORE Support Package" and "nRF CPU Support Package" form "Tools" >> "Package manager" before continuing. To open sample project, navigate to "File" >> "Open Solution" and Browse to the / examples / peripheral / blinky / pca10040e / blank / ses.
Again, only PCA10040e version (category of development board by Nordic) is compatible with Taiyo Yude BLE EYSNSNZWW KIT since it is nRF52811 based. There are several examples in nRF5 SDK which won't support PCA10040e version but of course, those can be ported to make supportable with Taiyo Yude BLE EYSNSNZWW by deep exploration and hacking on drivers and libraries.
After opening the above file, a sample project will pop up with blinky code for Nordic PCA10040 development board as selected. But.......wait! I am not having that board.
The ready opened code will get successfully debugged and even loaded to Taiyo Yuden EYSNSNZWW but nothing works. Its because that code has declarations made as for Nordic PCA10040 and its respective files. (I wondered at this point "am I not even able to blink an LED with this?"). But, thankfully realised and went through nRF52811 documentation and libraries to come up with following code which successfully enters into the MCU core and toggles GPIO. (suggest better idea if any)
#include <stdbool.h> //standard headers #include <stdint.h> #include "nrf_delay.h" #include "nrf_gpio.h" #define led 14 // GPIO subjeced to change as per int main(void) { nrf_gpio_cfg_output(led); //configure LED as output while(1) { nrf_gpio_pin_set(led); //Turn on nrf_delay_ms(500); nrf_gpio_pin_clear(led); //Turn off nrf_delay_ms(500); } }
Build, Verify, Upload.........and........there it goes!
And, GPIO input functionality with a pulled down Pushbutton attached to PIN 17 and LED at PIN 14 like this.
#include <stdbool.h> //standard headers #include <stdint.h> #include "nrf_delay.h" #include "nrf_gpio.h" #define LED 14 // LED atached to Pin 14 #define Button 17 // Pushbutton (pulled down) at Pin 17 int main(void) { nrf_gpio_cfg_output(LED); nrf_gpio_cfg_input(Button, NRF_GPIO_PIN_PULLUP); nrf_gpio_pin_clear(LED); while(true) { if(nrf_gpio_pin_read(Button)==1) //Checking for 1(pressed) in Pin 17 and open the loop if found { nrf_gpio_pin_set(LED); //Turn on LED while(nrf_gpio_pin_read(Button)==1); //Hold in the loop while pressed nrf_gpio_pin_clear(LED); //Turn off LED when pushbtton is left } } }
Yes, it's not very surprising to see an LED blink or some GPIO actions with this but, this is the way how it's done. This module is capable of doing much more and in the next part, I am going to unleash the real power of Taiyo Yuden BLE EYSNSNZWW BLE KIT (better to say nRF52811 because it is what is in it) by using Soft Device S13 layer over this and communicate with the real-world entity.
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.
// subjeted to change as per
Top Comments