About the espressif provided API questions!
-
- Posts: 48
- Joined: Wed May 04, 2016 7:32 pm
About the espressif provided API questions!
Postby PaulTsai111 » Wed May 18, 2016 9:56 am
I am studying about the esp8266 provided NonRTOS SDK. API seems only with function declared in the header files and
use the function by calling the function. I did not see any details of the API. So how can I start using these APIs?
Can you give me a sample on how to test and correct using these APIs? This make me with obsession !!
Re: About the espressif provided API questions!
Postby ESP_Faye » Thu May 19, 2016 9:58 am
You can refer to the documentation 2C-ESP8266__SDK__API Guide.
And here is some sample codes http://bbs.espressif.com/viewforum.php?f=31.
Thanks for your interest in ESP8266 !
-
- Posts: 48
- Joined: Wed May 04, 2016 7:32 pm
Re: About the espressif provided API questions!
Postby PaulTsai111 » Thu May 19, 2016 4:00 pm
Here is one simple test problem that I encoutered during monitoring the COM port terminals
I use the RTOS Version 1.4 SDK for running the simple demo code
as shown below.
after that I use ./gen_misc.sh to generate the user1.xxx.bin file
I use flash download tools to download the user1.xxx.bin file and bootv1.5.bin file
into the esp8266 IoT Refernce Compatible Board
After that , I turn off the power changed from Download Mode to Flash boot mode and power on
However, from the Serial Port Monitor tools Terminal View I can not see any correct
output from the terminal views
I am a little bit confused this result
I do not know why?
Is there any steps wrong?
-
- Posts: 9
- Joined: Thu Sep 24, 2015 8:53 am
Re: About the espressif provided API questions!
Postby zhijianli88 » Fri May 20, 2016 5:16 pm
you should configure you terminal baudrate to 74880
more details pls refer to the startup guide http://bbs.espressif.com/viewtopic.php?f=51&t=1023
Thanks
-
- Posts: 48
- Joined: Wed May 04, 2016 7:32 pm
Re: About the espressif provided API questions!
Postby PaulTsai111 » Mon May 23, 2016 5:42 pm
After studying the Espressif Starting Guide , I changed the crystal frequecy to 40MHz and set the baud rate to 115200 when downloads the bin files to the IoT Ref Compatible Board and use COM terminal monitor to monitor the messages output (baud rate =115200) when IoT Ref Board in reboot flash mode . The output still shows the strange and unknown codes. I guess it may be due to the bin compiling file is with problem , or my IoT Ref Compatible Board does not match the output bin files. (I used the newest version of NONRTOS/RTOS SDK, but Board is old version).Espressif provides the newer version of boards but our company still use older version. Can you give me some help or suggestion ? online help ?
-
- Posts: 48
- Joined: Wed May 04, 2016 7:32 pm
Re: About the espressif provided API questions!
Postby PaulTsai111 » Tue May 24, 2016 9:25 am
The attached bin file is that I tried under the NON-RTOS V1.6 16_04_18 SDK Version. Please Check and Give Technique Help ! Thanks
- Attachments
-
- bin_file.rar
- (301.66 KiB) Downloaded 399 times
Re: About the espressif provided API questions!
Postby ESP_Faye » Tue May 24, 2016 11:12 am
We tested your bin files, it works fine, it will try to connect to a router named "PaulTsai" after power on. Its baud rate is 74880.
The output still shows the strange and unknown codes.
Maybe because that your UART tool can not support baud rate 74880 ?
You can change the baud rate of ESP8266 by calling uart_init in user_init, refer to http://bbs.espressif.com/viewtopic.php?f=61&t=182.
Thanks for your interest in ESP8266 !
-
- Posts: 48
- Joined: Wed May 04, 2016 7:32 pm
Re: About the espressif provided API questions!
Postby PaulTsai111 » Tue May 24, 2016 6:34 pm
After adding the uart_init function in my main functions, It shows that unknown type wrong messages, can you show me which header file should be included in the main files ? The attached
file is my user_main.c files. please check !
esp8266@esp8266-VirtualBox:~/ESP8266_NONSDK_V1.5.3_16_04_18/ESP8266_NONOS_SDK/prac3$ ./gen_misc.sh
gen_misc.sh version 20150511
Please follow below steps(1-5) to generate specific bin(s):
STEP 1: choose boot version(0=boot_v1.1, 1=boot_v1.2+, 2=none)
enter(0/1/2, default 2):
1
boot mode: new
STEP 2: choose bin generate(0=eagle.flash.bin+eagle.irom0text.bin, 1=user1.bin, 2=user2.bin)
enter (0/1/2, default 0):
1
generate bin: user1.bin
STEP 3: choose spi speed(0=20MHz, 1=26.7MHz, 2=40MHz, 3=80MHz)
enter (0/1/2/3, default 2):
3
spi speed: 80 MHz
STEP 4: choose spi mode(0=QIO, 1=QOUT, 2=DIO, 3=DOUT)
enter (0/1/2/3, default 0):
3
spi mode: DOUT
STEP 5: choose spi size and map
0= 512KB( 256KB+ 256KB)
2=1024KB( 512KB+ 512KB)
3=2048KB( 512KB+ 512KB)
4=4096KB( 512KB+ 512KB)
5=2048KB(1024KB+1024KB)
6=4096KB(1024KB+1024KB)
enter (0/2/3/4/5/6, default 0):
2
spi size: 1024KB
spi ota map: 512KB + 512KB
start...
make[1]: Entering directory `/home/esp8266/ESP8266_NONSDK_V1.5.3_16_04_18/ESP8266_NONOS_SDK/prac3/user'
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -DLWIP_OPEN_SRC -DPBUF_RSV_FOR_WLAN -DEBUF_LWIP -I include -I ./ -I ../../rom/include -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../../driver_lib/include user_main.c
make[1]: Leaving directory `/home/esp8266/ESP8266_NONSDK_V1.5.3_16_04_18/ESP8266_NONOS_SDK/prac3/user'
make[1]: Entering directory `/home/esp8266/ESP8266_NONSDK_V1.5.3_16_04_18/ESP8266_NONOS_SDK/prac3/user'
xtensa-lx106-elf-gcc -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -DLWIP_OPEN_SRC -DPBUF_RSV_FOR_WLAN -DEBUF_LWIP -I include -I ./ -I ../../rom/include -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle -I ../../driver_lib/include -o .output/eagle/debug/obj/user_main.o -c user_main.c
user_main.c:274:11: error: unknown type name 'UartBautRate'
uart_init(UartBautRate uart0_br, UartBautRate uart1_br)
^
user_main.c:274:34: error: unknown type name 'UartBautRate'
uart_init(UartBautRate uart0_br, UartBautRate uart1_br)
^
make[1]: *** [.output/eagle/debug/obj/user_main.o] Error 1
make[1]: Leaving directory `/home/esp8266/ESP8266_NONSDK_V1.5.3_16_04_18/ESP8266_NONOS_SDK/prac3/user'
make: *** [.subdirs] Error 2
- Attachments
-
- user_main.rar
- (2.51 KiB) Downloaded 407 times
-
- Posts: 9
- Joined: Thu Sep 24, 2015 8:53 am
Re: About the espressif provided API questions!
Postby zhijianli88 » Fri May 27, 2016 11:35 am
PaulTsai111 wrote:Hi Espressif:
After studying the Espressif Starting Guide , I changed the crystal frequecy to 40MHz and set the baud rate to 115200
Hi, Espressif
Does the physical crystal effect this setting ?
Assume physical crystal is 26MHz, Can I set the crystal frequecy to 40MHz at the flash tools ?
Thanks
Who is online
Users browsing this forum: No registered users and 13 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.