ESP8266 Developer Zone The Official ESP8266 Forum 2016-03-11T19:01:38+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=1736 2016-03-11T19:01:38+08:00 2016-03-11T19:01:38+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1736&p=6080#p6080 <![CDATA[Re: RTOS SDK 1.3.0 UART_SetBaudrate undefined issue]]>
UART_SetBaudrate(UART_Port uart_no, uint32 baud_rate)
{
WRITE_PERI_REG(UART_CLKDIV(uart_no), (UART_CLK_FREQ / baud_rate));
}

I could change the baud rate to 115200.

Statistics: Posted by magdaleneratna — Fri Mar 11, 2016 7:01 pm


]]>
2016-02-04T16:30:46+08:00 2016-02-04T16:30:46+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1736&p=5679#p5679 <![CDATA[Re: RTOS SDK 1.3.0 UART_SetBaudrate undefined issue]]> I add driver line in Makefile follow your advice, and copy driver folder(copy from driver_lib/) into projet_template/, and copy driver header file into project_template/include/
Currently, a new error occur as following.

hw_timer.c: In function 'hw_timer_init':
hw_timer.c:79:5: error: passing argument 2 of '_xt_isr_attach' from incompatible pointer type [-Werror]
_xt_isr_attach(ETS_FRC_TIMER1_INUM, hw_timer_isr_cb, NULL);
^
In file included from /home/hw/esp_8266/ESP8266_RTOS_SDK_1.3.0/include/freertos/portable.h:318:0,
from /home/hw/esp_8266/ESP8266_RTOS_SDK_1.3.0/include/freertos/FreeRTOS.h:87,
from /home/hw/esp_8266/ESP8266_RTOS_SDK_1.3.0/include/spiffs/spiffs_config.h:18,
from /home/hw/esp_8266/ESP8266_RTOS_SDK_1.3.0/include/spiffs/spiffs.h:16,
from /home/hw/esp_8266/ESP8266_RTOS_SDK_1.3.0/include/espressif/esp_spiffs.h:28,
from /home/hw/esp_8266/ESP8266_RTOS_SDK_1.3.0/include/espressif/esp_common.h:102,
from hw_timer.c:25:
/home/hw/esp_8266/ESP8266_RTOS_SDK_1.3.0/include/freertos/portmacro.h:186:13: note: expected '_xt_isr' but argument is of type 'void (*)(void)'
void _xt_isr_attach (uint8 i, _xt_isr func, void *arg);
^
cc1: all warnings being treated as errors
make[1]: *** [.output/eagle/debug/obj/hw_timer.o] 错误 1
make[1]:正在离开目录 `/home/hw/esp_8266/ESP8266_RTOS_SDK_1.3.0/examples/project_template/driver'
make: *** [.subdirs] 错误 2

Statistics: Posted by htjgdw — Thu Feb 04, 2016 4:30 pm


]]>
2016-02-04T15:15:19+08:00 2016-02-04T15:15:19+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1736&p=5675#p5675 <![CDATA[Re: RTOS SDK 1.3.0 UART_SetBaudrate undefined issue]]>
You can check the makefile whether it contains the "driver" or not.

Code:

SUBDIRS=    \
   user    \
   driver


Thanks for your interest in ESP8266 !

Statistics: Posted by ESP_Faye — Thu Feb 04, 2016 3:15 pm


]]>
2016-02-04T10:02:52+08:00 2016-02-04T10:02:52+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1736&p=5666#p5666 <![CDATA[RTOS SDK 1.3.0 UART_SetBaudrate undefined issue]]>

Code:

#include "esp_common.h"
#include "uart.h"

/******************************************************************************
 * FunctionName : user_init
 * Description  : entry of user application, init user function here
 * Parameters   : none
 * Returns      : none
*******************************************************************************/
void user_init(void)
{
   [color=#FF0000]UART_SetBaudrate(UART0, 115200);[/color]
    printf("SDK version:%s\n", system_get_sdk_version());
   printf("ESP8266 chip ID: 0x%x\n", system_get_chip_id());
}

Statistics: Posted by htjgdw — Thu Feb 04, 2016 10:02 am


]]>