# SimpleFOClibrary support for ESP32 boards

**URL:** <https://community.simplefoc.com/t/simplefoclibrary-support-for-esp32-boards/61>\
**Category:** announcement\
**Created:** [August 11, 2020, 6:02am UTC](https://community.simplefoc.com/t/simplefoclibrary-support-for-esp32-boards/61 "2020-08-11T06:02:01Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![dab](https://community.simplefoc.com/user_avatar/community.simplefoc.com/dab/32/229_2.png) [@dab](https://community.simplefoc.com/u/dab)\
**Post date:** [October 5, 2020, 4:32pm UTC](https://community.simplefoc.com/t/simplefoclibrary-support-for-esp32-boards/61/21 "2020-10-05T16:32:44Z")

</div>

> [@Owen\_Williams](#):
>
> The coprocessor exception, from googling seems to be caused by trying to use the coprocessor (fpu) in an interrupt routine.

That’s very interesting. I’m using esp32 since a lot, and never heard about this.  
I still didn’t read the source, so I don’t feel yet confortable  
at changing it. But I’m ready to do tests, and have 3 very different BLDC motors to test.

---

<div class="post-metadata">

**Author:** ![Owen\_Williams](https://community.simplefoc.com/user_avatar/community.simplefoc.com/owen_williams/32/105_2.png) [@Owen\_Williams](https://community.simplefoc.com/u/Owen_Williams)\
**Post date:** [October 5, 2020, 4:44pm UTC](https://community.simplefoc.com/t/simplefoclibrary-support-for-esp32-boards/61/22 "2020-10-05T16:44:50Z")

</div>

> Floats use the FPU while doubles are calculated in software. For reasons, using the FPU inside an interrupt handler is currently not supported.

Above quote is from esp32 forum [here](https://esp32.com/viewtopic.php?t=1292)

I presume you’ve attached `encode.handleIndex()` to an interrupt on esp32. This function uses floats as I mentioned above.

---

<div class="post-metadata">

**Author:** ![dab](https://community.simplefoc.com/user_avatar/community.simplefoc.com/dab/32/229_2.png) [@dab](https://community.simplefoc.com/u/dab)\
**Post date:** [October 6, 2020, 12:36pm UTC](https://community.simplefoc.com/t/simplefoclibrary-support-for-esp32-boards/61/23 "2020-10-06T12:36:45Z")

</div>

Mentioned and solved [HERE](https://community.simplefoc.com/t/problems-with-index-and-esp32/150) thanks!

[Previous page](https://community.simplefoc.com/t/simplefoclibrary-support-for-esp32-boards/61.md?page=1)
