Search found 11 matches

by dkaufmann
Thu Jan 05, 2017 4:36 pm
Forum: Documentation Request
Topic: I2C Slave Mode
Replies: 57
Views: 64663

Re: I2C Slave Mode

Hi Mike,

yes that's true. But this is depending on the used SDK if this IRAM_ATTR is necessary. As far as I know the IRAM_ATTR is the default for NONOS SDK. if you use RTOS SDK it must be added.
by dkaufmann
Tue Nov 29, 2016 8:54 pm
Forum: Documentation Request
Topic: I2C Slave Mode
Replies: 57
Views: 64663

Re: I2C Slave Mode

Hi Rudi, okay. I still have no idea how to enter the interrupt routine faster. If I enter the ISR() on falling edge SDA and measure the SCL line, SCL has already changed to the next state. It is just not a real "interrupt" for me if it takes that long. DMA is no option for a simple I2C sla...
by dkaufmann
Tue Nov 22, 2016 7:47 pm
Forum: ESP8266 HDK
Topic: High priority interrupts
Replies: 3
Views: 4577

Re: High priority interrupts

Hi, i am also looking for a solution to have a faster GPIO interrupt. Entering and reading and input with the standard API functions takes >2.5us which is way too slow (at 160MHz this is around 400 cycles!!). Could you find a solution? A high priority GPIO interrupt would be nice. Or do you think th...
by dkaufmann
Tue Nov 22, 2016 3:44 pm
Forum: Documentation Request
Topic: I2C Slave Mode
Replies: 57
Views: 64663

Re: I2C Slave Mode

Hi Rudi, i am very interested in these ASM instruction to run the I2C faster. I'd like to run in high speed mode or at least >100kHz. is this line to read the inputs? how exactly? _l8ui a0, a11, GPIO_OFFSET_INPUT "if i delete the debug prints i can go on to 400 KHz with 160 MHz CPU": the i...
by dkaufmann
Mon Nov 21, 2016 4:47 pm
Forum: Documentation Request
Topic: I2C Slave Mode
Replies: 57
Views: 64663

Re: I2C Slave Mode

Dear all, I also shared some code here about the I2C slave code. But I still have some troubles with interrupt latencies. Sometimes I detect wrong START messages because the delay of measuring the inputs is too bad. Any ideas how to avoid this problem? By the way, I measure the inputs right at the b...
by dkaufmann
Wed Oct 26, 2016 10:46 pm
Forum: Documentation Request
Topic: I2C Slave Mode
Replies: 57
Views: 64663

Re: I2C Slave Mode

Hi Rudi,

okay I see. thanks for this one. Gonna try it out.

best regards
D.
by dkaufmann
Wed Oct 26, 2016 7:55 pm
Forum: Documentation Request
Topic: I2C Slave Mode
Replies: 57
Views: 64663

Re: I2C Slave Mode

Hi Rudi, I'm surprised that you manage to reach 400kHz with your method. When I implemented the interrupt driven version (with SCL and SDA interrupt), it already stopped to work with 100kHz. The interrupt latency was too high. From 100kHz I started to miss the next edge (from rising to the next fall...
by dkaufmann
Wed Oct 26, 2016 5:15 pm
Forum: Documentation Request
Topic: I2C Slave Mode
Replies: 57
Views: 64663

Re: I2C Slave Mode

Hi Rudi, a lot of comments :). Thanks for your review. In which case it happens, that a stop comes from the master after sending the address? I will add a general interrupt on the STOP signal, too. So I can stop the whole communication independent of the state. Thus, I also had a version with SCL an...
by dkaufmann
Tue Oct 25, 2016 5:04 pm
Forum: Documentation Request
Topic: I2C Slave Mode
Replies: 57
Views: 64663

Re: I2C Slave Mode

plus open drain config of the SDA/SCL pins //Set SDA as open drain GPIO_REG_WRITE( GPIO_PIN_ADDR(GPIO_ID_PIN(I2C_SDA_PIN)), GPIO_REG_READ(GPIO_PIN_ADDR(GPIO_ID_PIN(I2C_SDA_PIN))) | GPIO_PIN_PAD_DRIVER_SET(GPIO_PAD_DRIVER_ENABLE) ); GPIO_REG_WRITE(GPIO_ENABLE_ADDRESS, GPIO_REG_READ(GPIO_ENABLE_ADDRES...
by dkaufmann
Tue Oct 25, 2016 4:07 pm
Forum: Documentation Request
Topic: I2C Slave Mode
Replies: 57
Views: 64663

Re: I2C Slave Mode

I forgot the pin definition:

Code: Select all

//SDA on GPIO12
#define I2C_SDA_PIN 12
#define I2C_SDA_MUX PERIPHS_IO_MUX_MTDI_U
#define I2C_SDA_FUNC FUNC_GPIO12

//SCK on GPIO14
#define I2C_SCK_PIN 14
#define I2C_SCK_MUX PERIPHS_IO_MUX_MTMS_U
#define I2C_SCK_FUNC FUNC_GPIO14

Go to advanced search