SDK 1.1.0 problems

scargill
Posts: 70
Joined: Sun Nov 02, 2014 8:09 pm

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

scargill
Posts: 70
Joined: Sun Nov 02, 2014 8:09 pm

Re: SDK 1.1.0 problems

Postby scargill » Mon Jun 01, 2015 1:47 am

Actually I don't think it is there but that is where ECLIPSE is pointing...

scargill
Posts: 70
Joined: Sun Nov 02, 2014 8:09 pm

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();
}

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

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.

scargill
Posts: 70
Joined: Sun Nov 02, 2014 8:09 pm

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?

scargill
Posts: 70
Joined: Sun Nov 02, 2014 8:09 pm

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?

scargill
Posts: 70
Joined: Sun Nov 02, 2014 8:09 pm

Re: SDK 1.1.0 problems

Postby scargill » Mon Jun 01, 2015 4:55 pm

Sorry I meant functions. Do you have replacement interrupt enable and disable funtions?

Who is online

Users browsing this forum: No registered users and 6 guests