element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Vertical Farming
  • Challenges & Projects
  • Design Challenges
  • Vertical Farming
  • More
  • Cancel
Vertical Farming
Blog Vertical Hydroponics: Blog 6 - EZR32WG Wireless Starter Kit: Part 1
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: jamesod
  • Date Created: 28 Sep 2015 11:34 PM Date Created
  • Views 1521 views
  • Likes 2 likes
  • Comments 10 comments
  • vertical_hydroponics
  • vertical_farming
  • ezr32wg
  • wireless
Related
Recommended

Vertical Hydroponics: Blog 6 - EZR32WG Wireless Starter Kit: Part 1

jamesod
jamesod
28 Sep 2015

I have gotten a lot done since my last post, but I don't have time to write a detailed blog at the moment. I did want to give an update on my first chance to get started with what will be the controller for this project. More to come shortly.

 

This Friday I received the EZR32WG 915 MHz Wireless Starter Kit. Most of my time this weekend has revolved around getting to know the hardware and software that comes with this dev kit, and so far I am pretty impressed.

 

I began by installing Simplicity Studio. This was a fairly painless process. Then I started up the studio and connected one of the boards to my computer. After a few minor bumps, the board showed up in the Detected Hardware section. I moved the switch on the board to the AEM position, and went to the Kit Manager. There I updated the board firmware to the latest version. This gave me the “EZR32WG 915MHz Wireless Starter Kit (###)” as the detected Hardware instead of just “J-link Debugger.”


Next, I went to the software examples section. The appropriate Kit, Part, and SDK was automatically selected for me. I wanted to try out a program that would let me use the on-board display and push buttons first so I chose the SLWSTK6222A_clock program. I loaded this program into the IDE, and used the debug command to load it onto the board. It worked! I played with this to see how the buttons worked, and observed which libraries were used.

 

After this I tried out the ezradio_simple_trx example program. I loaded this onto both boards. When I pushed an button on one, the other received a number. This is a very simple example, but it shows how to implement bidirectional communication on these boards.

 

The last example program I looked at was SLWSTK6222A_humitemp. This program reads from the on board i2c temperature and humidity sensor and displays the data on the on board screen.

 

After looking through these examples I decided I had enough to hack together my first program on the board. I began with the ezradio_simple_trx program and added code from the humitemp program so that one board “Node1” sent the temperature to the other board “Gateway.” With this working successfully I now have a method for sending whatever data I want from the node to the Gateway.

 

With this working I can move on to getting data from the Gateway to the Beagle Bone Black Webserver. The I will write code to interface with all of the sensors and relays I am using, wire up the system in an enclosure, and start to write the main control code.

  • Sign in to reply

Top Comments

  • RWReynolds
    RWReynolds over 10 years ago +1
    Cool stuff James. Sounds like you've been busy. I also received the EZR32WG on Friday. Thanks element14Dave ! I've run the ezradio_simple_trx and a couple of other example applications. Works great. Busy…
  • jamesod
    jamesod over 10 years ago in reply to RWReynolds +1
    Are you having your system communicate with an external network? If so have you decided on a method yet? I've got communications between the radios working just fine, but I'm not sure how I'm going to…
  • RWReynolds
    RWReynolds over 10 years ago in reply to jamesod +1
    I'm doing the same on a Raspberry Pi James. Could have used a BBB, I have both available, but I've been playing with the RPi lately. lol... I actually have an RPi on both ends. On the cultivator end simply…
  • Former Member
    Former Member over 10 years ago

    Hi James O'Donnell,

     

    I am trying to do the same with two EZR32. I get the temperature in one module and I want to send it to the other one.

     

    I began with the ezradio_simple_trx program too and added code from the humitemp program. I can read the temperature perfectly into the board "Node1" (like a char for example and print into the screen), however, to send it I have to convert int32_t (temData variable) to uint8_t (radioTxPkt, argument of ezradioStartTransmitDefault() function). I have tried several options but I don't know how to convert it. I am almost rookie so maybe I am really wrong. Could you please help me?

     

    Cheers

    Tini

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jamesod
    jamesod over 10 years ago in reply to RWReynolds

    Thanks Rick.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • RWReynolds
    RWReynolds over 10 years ago in reply to RWReynolds

    This editor is just really horrible sometimes. :/

     

    Anyway... I had to find the correct route location value by trial and error. It was LOC3 for the EFM32ZG.

     

    1. /* Enable I/O pins at UART1 location #2 */ 
    2.    uart->ROUTE = USART_ROUTE_RXPEN | USART_ROUTE_TXPEN | USART_ROUTE_LOCATION_LOC1;
    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • RWReynolds
    RWReynolds over 10 years ago in reply to jamesod

    Sure thing James. I got most of this from the SiLabs forums. It was not a no-brainer. The main issue for me was the

     

     

    #include "main.h"
    
    
    /* Setup UART1 in async mode for RS232*/
    static USART_TypeDef   * uart   = USART1;
    static USART_InitAsync_TypeDef uartInit = USART_INITASYNC_DEFAULT;
    
    
    // System global serial.h extern USART1 RX interrupt flag
    bool gserialDataRx = false;
    
    
    unsigned char gRxCircularBuffer[CIRC_BUFF_SIZE] = { NUL_CHAR };
    int gRxCircularBufferCounter = 0;
    /**************************************************************************//**
     * @brief USART1 Interrupt handler for data received
     *****************************************************************************/
    void USART1_RX_IRQHandler(void)
    {
      // if RX buffer contains valid data proc char
        while(USART1->STATUS & (1 << 7)) //USART_IF_RXDATAV
        {
             // If end of circular buffer then add BEL and reset
             if ( gRxCircularBufferCounter == CIRC_BUFF_SIZE-1)
             {
                  gRxCircularBuffer[gRxCircularBufferCounter] = BEL;
                  gRxCircularBufferCounter = 0;
             }
    
    
             // add char to circular buffer
             gRxCircularBuffer[gRxCircularBufferCounter++] = USART1->RXDATA;
        }
    
    
        // Clear interrupt
        USART_IntClear(USART1, (1 << 7));
    }
    
    
    void UartSetup(void)
    {
      /* Enable clock for GPIO module (required for pin configuration) */
      //CMU_ClockEnable(cmuClock_GPIO, true);
    
    
      // Initialize USART1 clock
      CMU_ClockEnable(cmuClock_USART1, true);
    
    
      /* Configure expansion header USART1 GPIO pins */
      GPIO_PinModeSet(gpioPortD, 0, gpioModePushPull, 1);
      GPIO_PinModeSet(gpioPortD, 1, gpioModeInput, 0);
    
    
    
    
       /* Prepare struct for initializing UART in asynchronous mode*/
       uartInit.enable       = usartDisable;   /* Don't enable UART upon intialization */
       uartInit.refFreq      = 0;              /* Provide information on reference frequency. When set to 0, the reference frequency is */
       uartInit.baudrate     = 115200;         /* Baud rate */
       uartInit.oversampling = usartOVS16;     /* Oversampling. Range is 4x, 6x, 8x or 16x */
       uartInit.databits     = usartDatabits8; /* Number of data bits. Range is 4 to 10 */
       uartInit.parity       = usartNoParity;  /* Parity mode */
       uartInit.stopbits     = usartStopbits1; /* Number of stop bits. Range is 0 to 2 */
       uartInit.mvdis        = false;          /* Disable majority voting */
       uartInit.prsRxEnable  = false;          /* Enable USART Rx via Peripheral Reflex System */
       uartInit.prsRxCh      = usartPrsRxCh0;  /* Select PRS channel if enabled */
    
    
       /* Initialize USART with uartInit struct */
       USART_InitAsync(uart, &uartInit);
    
    
       /* Prepare UART Rx and Tx interrupts */
       USART_IntClear(uart, _USART_IF_MASK);
       USART_IntEnable(uart, USART_IF_RXDATAV);
       NVIC_ClearPendingIRQ(USART1_RX_IRQn);
       NVIC_ClearPendingIRQ(USART1_TX_IRQn);
       NVIC_EnableIRQ(USART1_RX_IRQn);
       NVIC_EnableIRQ(USART1_TX_IRQn);
    
    
       /* Enable I/O pins at UART1 location #2 */
       uart->ROUTE = USART_ROUTE_RXPEN | USART_ROUTE_TXPEN | USART_ROUTE_LOCATION_LOC1;
    
    
       /* Enable UART */
       USART_Enable(uart, usartEnable);
    }

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jamesod
    jamesod over 10 years ago in reply to RWReynolds

    Hey Rick do you mind sharing your code for using the UART? I thought it would be easy enough to set up, but I'm running into some problems.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube