Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e5ea089

Browse filesBrowse files
stickbreakerme-no-dev
authored andcommitted
Reduce resource requirements, Share Interrupt (espressif#1877)
espressif#1869 exposed a resource exhaustion issue. The current HAL layer for I2C support is designed to use a shared interrupt, But, during debugging to solve the interrupt overloading condition identified in espressif#1588, and the generation of pr espressif#1717, the interrupt allocation parameters were changed. This change was unnecessary, the code will work successfully with shared interrupts. So, there is no need to assign a private interrupt for each I2C peripheral.
1 parent 96822d7 commit e5ea089
Copy full SHA for e5ea089

File tree

1 file changed

+4
-4
lines changed
Filter options

1 file changed

+4
-4
lines changed

‎cores/esp32/esp32-hal-i2c.c

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-i2c.c
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,10 +1200,10 @@ i2c_err_t i2cProcQueue(i2c_t * i2c, uint32_t *readCount, uint16_t timeOutMillis)
12001200
if(!i2c->intr_handle) { // create ISR for either peripheral
12011201
// log_i("create ISR %d",i2c->num);
12021202
uint32_t ret = 0;
1203-
uint32_t flags = ESP_INTR_FLAG_EDGE | //< Edge-triggered interrupt
1204-
ESP_INTR_FLAG_IRAM | //< ISR can be called if cache is disabled
1205-
ESP_INTR_FLAG_LOWMED; //< Low and medium prio interrupts. These can be handled in C.
1206-
1203+
uint32_t flags = ESP_INTR_FLAG_IRAM | //< ISR can be called if cache is disabled
1204+
ESP_INTR_FLAG_LOWMED | //< Low and medium prio interrupts. These can be handled in C.
1205+
ESP_INTR_FLAG_SHARED; //< Reduce resource requirements, Share interrupts
1206+
12071207
if(i2c->num) {
12081208
ret = esp_intr_alloc_intrstatus(ETS_I2C_EXT1_INTR_SOURCE, flags, (uint32_t)&i2c->dev->int_status.val, interruptsEnabled, &i2c_isr_handler_default,i2c, &i2c->intr_handle);
12091209
} else {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.