ESP8266 Developer Zone The Official ESP8266 Forum 2015-06-01T16:55:05+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=483 2015-06-01T16:55:05+08:00 2015-06-01T16:55:05+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=2000#p2000 <![CDATA[Re: SDK 1.1.0 problems]]> Statistics: Posted by scargill — Mon Jun 01, 2015 4:55 pm


]]>
2015-06-01T04:24:32+08:00 2015-06-01T04:24:32+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1983#p1983 <![CDATA[Re: SDK 1.1.0 problems]]> Statistics: Posted by scargill — Mon Jun 01, 2015 4:24 am


]]>
2015-06-01T02:03:14+08:00 2015-06-01T02:03:14+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1982#p1982 <![CDATA[Re: SDK 1.1.0 problems]]>
So I commented out the interrupt enable and disable - and put in your dummy routine - and now the code compiles.

But instead of running, I now get a constant stream of characters coming out of the serial line on power up and can go no further.

Any ideas?

Statistics: Posted by scargill — Mon Jun 01, 2015 2:03 am


]]>
2015-06-01T01:53:35+08:00 2015-06-01T01:53:35+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1981#p1981 <![CDATA[Re: SDK 1.1.0 problems]]>
scargill wrote:
ok here it is....

This is the WS2812B driver - interrupts must be disabled


void ICACHE_FLASH_ATTR WS2812OutBuffer(uint8_t * buffer, uint16_t length, uint16_t repetition)
{
uint16_t i;
os_intr_lock();

for (i = 0; i < 5; i++)
WRITE_PERI_REG(PERIPHS_GPIO_BASEADDR + 8, rainb12);
while (repetition--) {
for (i = 0; i < length; i++) {
uint8_t mask = 0x80;
uint8_t byte = buffer[i];
while (mask) {
(byte & mask) ? SEND_WS_12_1() : SEND_WS_12_0();
mask >>= 1;
}
}
}
os_intr_unlock();
}


OK, replace with ETS_INTR_LOCK/UNLOCK.

Statistics: Posted by costaud — Mon Jun 01, 2015 1:53 am


]]>
2015-06-01T01:51:12+08:00 2015-06-01T01:51:12+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1980#p1980 <![CDATA[Re: SDK 1.1.0 problems]]>
This is the WS2812B driver - interrupts must be disabled


void ICACHE_FLASH_ATTR WS2812OutBuffer(uint8_t * buffer, uint16_t length, uint16_t repetition)
{
uint16_t i;
os_intr_lock();

for (i = 0; i < 5; i++)
WRITE_PERI_REG(PERIPHS_GPIO_BASEADDR + 8, rainb12);
while (repetition--) {
for (i = 0; i < length; i++) {
uint8_t mask = 0x80;
uint8_t byte = buffer[i];
while (mask) {
(byte & mask) ? SEND_WS_12_1() : SEND_WS_12_0();
mask >>= 1;
}
}
}
os_intr_unlock();
}

Statistics: Posted by scargill — Mon Jun 01, 2015 1:51 am


]]>
2015-06-01T01:47:11+08:00 2015-06-01T01:47:11+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1979#p1979 <![CDATA[Re: SDK 1.1.0 problems]]> Statistics: Posted by scargill — Mon Jun 01, 2015 1:47 am


]]>
2015-06-01T01:39:45+08:00 2015-06-01T01:39:45+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1978#p1978 <![CDATA[Re: SDK 1.1.0 problems]]>

while (!GPIO_INPUT_GET(gpioPin));
GPIO_OUTPUT_SET(gpioPin, 0);
os_delay_us(480);
GPIO_DIS_OUTPUT(gpioPin);
os_delay_us(480);
}

This is part of the code used to reset the Dallas thermometer chips.... the macro GPIO_DIS_OUTPUT uses the os_intr_lock and unlock

Statistics: Posted by scargill — Mon Jun 01, 2015 1:39 am


]]>
2015-06-01T01:28:56+08:00 2015-06-01T01:28:56+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1977#p1977 <![CDATA[Re: SDK 1.1.0 problems]]>
scargill wrote:
This is in code I didn't write - (the http server code) -so I don't know what it is doing - but it has worked up to now.

So......

user_rf_pre_init

As this is no longer defined, what do I put in it's place...

Again in code I did not write - same code, there are references to both os_intr_lock and os_intr_unlock..

As these both worked in the previous SDK, what do I need to add so they work?


1. I think you are using some open source code from github?Would you please give the link please?
2. For rf_pre_init, just add an empty function in user_main.c :
void user_rf_pre_init(void)
{
}
3. I need to see the code , usually just block os_intr_lock/unlock sentences.

Statistics: Posted by costaud — Mon Jun 01, 2015 1:28 am


]]>
2015-06-01T01:22:15+08:00 2015-06-01T01:22:15+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1976#p1976 <![CDATA[Re: SDK 1.1.0 problems]]>
So......

user_rf_pre_init

As this is no longer defined, what do I put in it's place...

Again in code I did not write - same code, there are references to both os_intr_lock and os_intr_unlock..

As these both worked in the previous SDK, what do I need to add so they work?

Statistics: Posted by scargill — Mon Jun 01, 2015 1:22 am


]]>
2015-06-01T01:13:37+08:00 2015-06-01T01:13:37+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1975#p1975 <![CDATA[Re: SDK 1.1.0 problems]]>
scargill wrote:
HI

I understand we can simply remove reference to the GPIP DISABLE PULLDOWN commands but what exactly do we need to put in user_main to replace user_rf_pre_init ???

and what about these missing commands?

undefined reference to `os_intr_lock'
undefined reference to `os_intr_unlock'



Did you already use "os_intr_lock/unlock" before??

I don't understand what did you mean by saying “put in user_main to replace user_rf_pre_init"?

The sequence of chip booting is : power on->load flash->RF init->user_init. If you want to do something right before the RF init, you should add these codes to user_rf_pre_init().

For example, if you want to decide whether to open RF module after power on(read sensor data or gpio levels),add the judgement in user_rf_pre_init(), see usage of system_phy_set_rfoption in "Programme guide" documentation.

Statistics: Posted by costaud — Mon Jun 01, 2015 1:13 am


]]>
2015-06-01T00:59:42+08:00 2015-06-01T00:59:42+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1974#p1974 <![CDATA[Re: SDK 1.1.0 problems]]>
I understand we can simply remove reference to the GPIP DISABLE PULLDOWN commands but what exactly do we need to put in user_main to replace user_rf_pre_init ???

and what about these missing commands?

undefined reference to `os_intr_lock'
undefined reference to `os_intr_unlock'

Statistics: Posted by scargill — Mon Jun 01, 2015 12:59 am


]]>
2015-05-26T15:34:47+08:00 2015-05-26T15:34:47+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1876#p1876 <![CDATA[Re: SDK 1.1.0 problems]]>
tve wrote:
Can you please also explain the following changes? Is there a pull-down option on the gpio pins or is there not? What does "pullup2" do?

Code:

diff -r esp_iot_sdk_v1.0.1/include/eagle_soc.h esp_iot_sdk_v1.1.0/include/eagle_soc.h
187c187
< #define PERIPHS_IO_MUX_PULLDWN          BIT6
---
> #define PERIPHS_IO_MUX_PULLUP2          BIT6
189c189
< #define PERIPHS_IO_MUX_SLEEP_PULLDWN    BIT2
---
> #define PERIPHS_IO_MUX_SLEEP_PULLUP2    BIT2
246,247c246
< #define PIN_PULLDWN_DIS(PIN_NAME)             CLEAR_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLDWN)
< #define PIN_PULLDWN_EN(PIN_NAME)              SET_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLDWN)
---
>



PERIPHS_IO_MUX_PULLUP2
We just remove the PULLDOWN definition because our pins do not support inside-pulldown function now.
Functionally, It's the same as PERIPHS_IO_MUX_PULLUP.

Statistics: Posted by costaud — Tue May 26, 2015 3:34 pm


]]>
2015-05-26T15:05:47+08:00 2015-05-26T15:05:47+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1874#p1874 <![CDATA[Re: SDK 1.1.0 problems]]> Statistics: Posted by Guest — Tue May 26, 2015 3:05 pm


]]>
2015-05-26T14:30:02+08:00 2015-05-26T14:30:02+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1872#p1872 <![CDATA[Re: SDK 1.1.0 problems]]> I also hit below build error with SDK 1.1.0.
/opt/esp8266/esp-open-sdk/sdk/lib/libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x34c): undefined reference to `user_rf_pre_init'
/opt/esp8266/esp-open-sdk/sdk/lib/libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x478): undefined reference to `user_rf_pre_init'
collect2: error: ld returned 1 exit status

Any suggestions?
Thanks.

Statistics: Posted by Guest — Tue May 26, 2015 2:30 pm


]]>
2015-05-26T13:36:13+08:00 2015-05-26T13:36:13+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1866#p1866 <![CDATA[Re: SDK 1.1.0 problems]]>
Sorry for the inconvenience,we removed some useless APIs from os_api.h

SDK_v1.1.0 release note updates as http://bbs.espressif.com/viewtopic.php?f=5&t=481&p=1832

Thanks for your valuable advices.

Statistics: Posted by ESP_Faye — Tue May 26, 2015 1:36 pm


]]>
2015-05-23T23:53:50+08:00 2015-05-23T23:53:50+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1836#p1836 <![CDATA[Re: SDK 1.1.0 problems]]>

Code:

diff -r esp_iot_sdk_v1.0.1/include/eagle_soc.h esp_iot_sdk_v1.1.0/include/eagle_soc.h
187c187
< #define PERIPHS_IO_MUX_PULLDWN          BIT6
---
> #define PERIPHS_IO_MUX_PULLUP2          BIT6
189c189
< #define PERIPHS_IO_MUX_SLEEP_PULLDWN    BIT2
---
> #define PERIPHS_IO_MUX_SLEEP_PULLUP2    BIT2
246,247c246
< #define PIN_PULLDWN_DIS(PIN_NAME)             CLEAR_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLDWN)
< #define PIN_PULLDWN_EN(PIN_NAME)              SET_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLDWN)
---
>

Statistics: Posted by tve — Sat May 23, 2015 11:53 pm


]]>
2015-05-23T23:37:09+08:00 2015-05-23T23:37:09+08:00 https://bbs.espressif.com:443/viewtopic.php?t=483&p=1835#p1835 <![CDATA[SDK 1.1.0 problems]]>
The SDK 1.1.0 removes os_timer_arm, os_timer_disarm, os_timer_setfn: what's your thinking? These were documented functions in the SDK 1.0.1 document so their silent disappearance is rather strange. E.g.:

Code:

diff -r esp_iot_sdk_v1.0.1/include/osapi.h esp_iot_sdk_v1.1.0/include/osapi.h
39,41d31
< #define os_timer_done ets_timer_done
< #define os_timer_handler_isr ets_timer_handler_isr
< #define os_timer_init ets_timer_init
45d34
< #define os_update_cpu_frequency ets_update_cpu_frequency


The SDK drops a number of other os_ functions from the header files, it would be good for the release notes to mention some of this (perhaps with a rationale).

Could you please upload updated docs?

Thanks!
Thorsten

Statistics: Posted by tve — Sat May 23, 2015 11:37 pm


]]>