DPORT access workaround and high interrupts.

Malishev
Posts: 6
Joined: Tue Mar 05, 2019 7:35 am

DPORT access workaround and high interrupts.

Postby Malishev » Thu Jun 13, 2019 4:16 am

Hi!
Is it safe to access peripheral registers from high interrupt handler? I ask, cause this interrupts is not disabled via freertos macro, so esp-idf dport access workaround do not work in this case.

Malishev
Posts: 6
Joined: Tue Mar 05, 2019 7:35 am

Re: DPORT access workaround and high interrupts.

Postby Malishev » Thu Jun 13, 2019 2:29 pm

Actually interrupt handler for interrupt with level > 4 will break both workarounds. APB register preread workaround do not work, cause it only disable level 3 or lower ints. Stalling other cpu workaround also do not actually stall cpu if 4 lev int arrive.
So far I got no other responses, so I would conclude that high ints in esp32 are not usable due to silicon bug.

ESP_Angus
Posts: 1648
Joined: Sun May 08, 2016 4:11 am

Re: DPORT access workaround and high interrupts.

Postby ESP_Angus » Mon Jun 24, 2019 10:52 am

Hi Malishev,

Thanks for reporting this and being patient while someone got back to you. You're correct that using a high level interrupt will currently break the DPORT access workaround.

The fix seems like it should be as simple as having the workaround disable higher priority interrupts as well. We're going to verify that's the case and release a fix. Will reply here when we have more to tell you.

Malishev
Posts: 6
Joined: Tue Mar 05, 2019 7:35 am

Re: DPORT access workaround and high interrupts.

Postby Malishev » Mon Jun 24, 2019 1:55 pm

Hi! Thank you for looking into this.

Disable all not-nmi intrrupts in the workaround looks resonable. I hope the fix will not disable high interrupts in portENTER_CRITICAL, cause this will make high ints much less usefull.

I wounder if dport access is used at all in the post initialization stage. It is used in hw crypto, but this could be easily disabled. Do the wifi binary use dport registers?

Who is online

Users browsing this forum: No registered users and 23 guests