Featured

Engineer dreams!

This is the post excerpt.

Advertisements

Here in this blog I would like to share my ideas regarding the technology and the social. As you see in this below image I am a dreaming person who always dreams about the tomorrows rising sun with new ideas and solution to the existing problems.Please find the use of this blog…

post

GR-LYCHEE programming (combination of ARM and ESP32 Arduino)

Hi all,

Today while surfing internet for my new project which needs 10 I/O, 2 UART, Camera, Audio and WiFi, I came across this special board called GR LYCHEE which is satisfy all your hardware needs. This board is having Renesas RZ/A1LU(ARM Cortex -A9) processor and Arduino ESP32 where ESP32 helps to build WiFi and Web connection and ARM supports with Camera, audio and numerous peripheral and GPIO’s. Getting all these things on a single chip is very difficult and communicating between ARM and arduino should match their clock. But this board made my work easier. Okay let’s take a look at it’s features

Features

1) Renesas RZ/A1LU

  • High performance Arm® Cortex™-A9 Core * including NEON and FPU
  • Max 400MHz(It is 384MHz on this board), 3MB On-Chip RAM
  • 32KB Instruction cache, 32 KB Data cache and 128KB L2 cache
  • 2xUSB Host/Device Interface e) 3xSPI, 4xI2C, 5xUART, 8×12-bits ADC, 2xCAN,                1xLCDC, 1xCamera Input
  • 2xSD, 2xMMC, GPIO

2) GR-LYCHEE

  • 8MB FLASH
  • 2xUSB Host/Device Interface
  • 3xSPI, 3xI2C, 5xUART, 7×12-bits ADC, 2xCAN
  • 1xCamera(VGA 640×480), 1xWi-Fi, 1xAudio(4-pole stereo mini)
  • To be supported * 1xLCDC(40pin)

3) Arduino UNO form-factor

  • Compatible with a wide range of commercially available shields
  • Built-in USB drag ‘n’ drop FLASH programmer

For more details about GR LYCHEE visit

http://gadget.renesas.com/en/product/lychee.html
Now we will go to installation and other stuff
GR LYCHEE installation guide and working
How to program and install?
Their are mainly two methods where you can program on GR LYCHEE

1) Using WEB COMPILER(ONLINE COMPILER) : This is the online based method where you can program  and download the source code from the site.  If you want indetail explaination you can visit this page  http://gadget.renesas.com/en/product/lychee_sp/1.html
2) Using GR IDE(OFFLINE COMPILER) : This is offline compiler similer to your arduino compiler  donload the zip file(link provided below) and install it.   http://gadget.renesas.com/en/product/ide4gr.html
The programming language used will be ‘C’. As I said the programming is similer to arduino a small changes should be done for the pin declaration and all. This you can find athttp://gadget.renesas.com/en/product/lychee_sp/2.html
A simple program reads the pin SW0 and depend upon the value of the input pin the led will be blinked
#include <Arduino.h>                                                                                                                      Arduino uses the header called Arduino.h which knows all the pins which are connected  and their functionality and behaviour of each instruction and clock synchronization.
#define INTERVAL 100                                                                                                                          This defines the time interval between first and next statement in this program, this may change as you use it since I have used this to define my delay it assigns 100 wherever I use INTERVAL and this value can be changed as your requirement.
pinMode(PIN_LED_RED   , OUTPUT);                                                          pinMode(PIN_LED_GREEN , OUTPUT);                                                                          pinMode(PIN_SW0        , INPUT);                                                                                                      In normal arduino program we use pin no or name defining pin no in the same way here also we are using PIN_LED_RED which is already present in GR LYCHEE board and defined it as OUTPUT port and PIN_SW0 as input port where we read data from PIN_SW0.
if(digitalRead(PIN_SW0)){                                                                              digitalWrite(PIN_LED_GREEN, HIGH);                                                                                               } else {                                                                                                                           digitalWrite(PIN_LED_GREEN, LOW);                                                                                             }                                                                                                                                                                  This is conditional statement which is having read instruction ‘digitalRead(PIN_SW0)’, this instruction reads PIN_SW0and gives you 0 0r 1 value. If it is ‘1’ then digitalWrite(PIN_LED_GREEN, HIGH) will be executed where this instruction sends ‘1’ or ‘HIGH’ to  PIN_LED_GREEN then green led glows, if the read value is ‘0’ then digitalWrite(PIN_LED_GREEN, LOW)will be executed where this instruction sends ‘0’ or ‘LOW’ to  PIN_LED_GREEN then green led turns off.
delay(INTERVAL);                                                                                                                                      This gives the delay(time gap) from first to next instruction where the amount of delay will be equal to INTERVAL i.e, 100s defined in #define INTERVAL 100
//Program
#include <Arduino.h>

#define INTERVAL 100        //INTERVAL=100

void setup(){

pinMode(PIN_LED_RED   , OUTPUT);

pinMode(PIN_LED_GREEN , OUTPUT);

pinMode(PIN_SW0        , INPUT);

}

void loop(){

if(digitalRead(PIN_SW0)){

digitalWrite(PIN_LED_GREEN, HIGH);

}                                                                                                                                                                  else {                                                                                                                  digitalWrite(PIN_LED_GREEN, LOW);                                                                                                }

digitalWrite(PIN_LED_RED, HIGH);                                                                                  delay(INTERVAL);                                                                                  digitalWrite(PIN_LED_RED, LOW);                                                                                      delay(INTERVAL);                                                                                                                                    }
for further more details on programming and uploading to kit please visit to the below link. Here you can get libraries of camera, audio and web.    http://gadget.renesas.com/en/reference/lychee/index.html

You can get large amount of programs in GITHUB repository on GR LYCHEE by many contributors around the  globe                                                                        https://github.com/search?p=1&q=GR+LYCHEE&type=Repositories

Solutions for failed to autobaud problem in lpc 1768

Before going to dump your code check the connections that is from pc to board your connection should be from rs232 to db9 then db9 to board. Once the connection is done make sure that your db9 is connected to ISP then, before submitting to board hold ISP button and then hold reset button then release reset button then release ISP button. Now click on submit button in your pc.

If you even not able to dump means follow below procedure.

Follow these procedure to dump your code on lpc 1768.

  1. Initially check your RS232 cable working properly or not, to check this at the end of your cable you will be having db9 connector in that it consists of Rx and TX pins from which your rs232 is connected short both Rx and TX, now in your terminal window at the input window type anything that should appear on your output window if nothing appears then their will be damage in your cable.
  2. If your rs232 cable is correct even you are not getting means check your db9 this can be done by the same above steps should be followed instead of shorting Rx and TX at rs 232 cable side short in your lpc 1768 kit Rx and TX pins i.e. at the ISP port of your lpc kit. Caution: Be careful while shorting pins in the board a small deviation may cause serious problem and shorting should not be done using solder just place two wires at the pins.    Now check by typing something in your input window and check at the output window. if anything occur what you have typed then your db9 is correct.
  3. Even though you are not getting means go to this link http://binaryupdates.com/flash-magic-tool-failed-to-autobaud/