SDK 1.1.0 problems
Re: SDK 1.1.0 problems
Postby scargill » Mon Jun 01, 2015 1:39 am
I'm guessing this is to stop interrupts....
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
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
Re: SDK 1.1.0 problems
Postby scargill » Mon Jun 01, 2015 1:51 am
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();
}
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();
}
Re: SDK 1.1.0 problems
Postby costaud » Mon Jun 01, 2015 1:53 am
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.
Re: SDK 1.1.0 problems
Postby scargill » Mon Jun 01, 2015 2:03 am
Ok,
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?
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?
Re: SDK 1.1.0 problems
Postby scargill » Mon Jun 01, 2015 4:24 am
On testing the WE2812B Serial LED software, it will ABSOLUTELY not work without disabling and enabling the interrupts - do you have replacement routines for the ones that no longer work?
Who is online
Users browsing this forum: No registered users and 26 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.