# MKS ESP32 Dual FOC

**URL:** https://community.simplefoc.com/t/mks-esp32-dual-foc/4696
**Category:** Uncategorized
**Tags:** esp32
**Created:** [March 26, 2024, 11:44pm UTC](https://community.simplefoc.com/t/mks-esp32-dual-foc/4696 "2024-03-26T23:44:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Manuel\_J](https://community.simplefoc.com/user_avatar/community.simplefoc.com/manuel_j/32/6387_2.png) [@Manuel\_J](https://community.simplefoc.com/u/Manuel_J)
#### Post date: [March 26, 2024, 11:44pm UTC](https://community.simplefoc.com/t/mks-esp32-dual-foc/4696/1 "2024-03-26T23:44:54Z")

</div>

I bought one board from Aliexpress and I just recieved it and in my way to try it a got an error when compiling the example code from the library.

[https://es.aliexpress.com/item/1005005548636290.html?spm=a2g0o.order\_list.order\_list\_main.41.21ef194db0rvbm&gatewayAdapt=glo2deu](https://es.aliexpress.com/item/1005005548636290.html?spm=a2g0o.order_list.order_list_main.41.21ef194db0rvbm&gatewayAdapt=glo2deu)

```auto
In file included from c:\Users\_\Documents\Arduino\libraries\Simple_FOC\src\current_sense\hardware_specific\esp32\esp32_mcu.cpp:3:
c:\users\_\documents\arduino\libraries\simple_foc\src\drivers\hardware_specific\esp32\esp32_driver_mcpwm.h:11:62: note: '#pragma message: SimpleFOC: compiling for ESP32 MCPWM driver'
   11 | #pragma message("SimpleFOC: compiling for ESP32 MCPWM driver")
      | ^
c:\Users\_\Documents\Arduino\libraries\Simple_FOC\src\current_sense\hardware_specific\esp32\esp32_mcu.cpp: In function 'void _driverSyncLowSide(void*, void*)':
c:\Users\_\Documents\Arduino\libraries\Simple_FOC\src\current_sense\hardware_specific\esp32\esp32_mcu.cpp:119:5: error: 'mcpwm_isr_register' was not declared in this scope
  119 | mcpwm_isr_register(mcpwm_unit, mcpwm0_isr_handler, NULL, ESP_INTR_FLAG_IRAM, NULL); //Set ISR Handler
      | ^ ~~~~~~~~~~~~~~~~~
c:\Users\_\Documents\Arduino\libraries\Simple_FOC\src\current_sense\hardware_specific\esp32\esp32_mcu.cpp:121:5: error: 'mcpwm_isr_register' was not declared in this scope
  121 | mcpwm_isr_register(mcpwm_unit, mcpwm1_isr_handler, NULL, ESP_INTR_FLAG_IRAM, NULL); //Set ISR Handler
      | ^ ~~~~~~~~~~~~~~~~~

exit status 1

Compilation error: exit status 1

```

Could anyone help me?  
Thanks you 😃

---

<div class="post-metadata">

### Author: ![Antun\_Skuric](https://community.simplefoc.com/user_avatar/community.simplefoc.com/antun_skuric/32/21_2.png) [@Antun\_Skuric](https://community.simplefoc.com/u/Antun_Skuric)
#### Post date: [March 27, 2024, 5:51am UTC](https://community.simplefoc.com/t/mks-esp32-dual-foc/4696/2 "2024-03-27T05:51:24Z")

</div>

Which version of the Arduino esp32 package are you using?  
That is the esp32 support package installed through Arduino Board manager.  
Make sure it is not the v3.0.0 version, which is in its alpha release.
