uart_div_modify failed!
uart_div_modify failed!
Postby wjzhang » Tue Oct 20, 2015 6:24 pm
Hi: the ESP8266 standard boot-vx.x.bin did not meet our requirement. i write another boot firmware. the UART driver is copy from normal firmware(USER1/USER2), it's working fine. but it in boot firmware. it's seem the baudrate setting is wrong.
difference between these 2 UART driver:
1) boot uart driver no interrupt support
2) boot uart driver all function run in RAM. no ICACHE_FLASH_ATTR.
baudrate at 230400: send are 0xC0, 0x16, 0x06, 0x40, 0x00, 0x00, 0xxx, 0xxx, 0xC0, receive are 0x90, 0x8a, 0x40, 0xd9, 0xf0
could someone tell me why the uart_div_modify() failed?
difference between these 2 UART driver:
1) boot uart driver no interrupt support
2) boot uart driver all function run in RAM. no ICACHE_FLASH_ATTR.
baudrate at 230400: send are 0xC0, 0x16, 0x06, 0x40, 0x00, 0x00, 0xxx, 0xxx, 0xC0, receive are 0x90, 0x8a, 0x40, 0xd9, 0xf0
could someone tell me why the uart_div_modify() failed?
Re: uart_div_modify failed!
Postby wjzhang » Thu Oct 22, 2015 12:16 pm
Hi I'm found a interest thing. the PC baudrate set to 230400. the ESP8266 baudrate set to 354461. the ESP8266 will receive right datas.
230400/354461 = 0.65. it seem the CPU freq in call_user_start() is 80Mhz * 0.65 = 52Mhz.
Could some tell me what's going on?
230400/354461 = 0.65. it seem the CPU freq in call_user_start() is 80Mhz * 0.65 = 52Mhz.
Could some tell me what's going on?

Re: uart_div_modify failed!
Postby costaud » Mon Oct 26, 2015 3:57 pm
wjzhang wrote:Hi I'm found a interest thing. the PC baudrate set to 230400. the ESP8266 baudrate set to 354461. the ESP8266 will receive right datas.
230400/354461 = 0.65. it seem the CPU freq in call_user_start() is 80Mhz * 0.65 = 52Mhz.
Could some tell me what's going on?
Hello,
How do you write the boot loader, does Espressif send you some reference code ?
The problem is , before the digital part has been initialized , the system clock is set to double of the crystal frequency.
That's why if you are using a 40M crystal the uart output is at baud 115200, and if you are using a 26M crystal the uart output is at baud 74880 during booting up. 115200/74880 = 40M / 26M = 80M / 52M.
Re: uart_div_modify failed!
Postby wjzhang » Mon Oct 26, 2015 6:04 pm
Hi costaud:
Thanks for your information. unfortunately i did not get reference code from Espressif. i reference the richard RBOOT project.
write the source code , Makefile, tool generate the headfile...
{http://richard.burtons.org/}
Best regards!
ZhangWenjin
Thanks for your information. unfortunately i did not get reference code from Espressif. i reference the richard RBOOT project.
write the source code , Makefile, tool generate the headfile...
{http://richard.burtons.org/}
Best regards!
ZhangWenjin
Who is online
Users browsing this forum: No registered users and 83 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.