Are you sure the environment is set up correctly? Is this on ArduinoIDE or on PlatformIO?
The UNO R4 support is very new, so there could still be some bugs and problems. But this one looks more like something isn’t setup right - executing an undefined instruction isn’t something that should be caused by a bug in the simplefoc code, but more like a compiler error.
Hi @runger, Thank you for your reply.
I am using R4 wifi with IDE.
I’m not sure what do you mean by environment set up but i’m using SimpleFOC Shieldv2.0.4, SimpleFOC library 2.3 with the R4 PR, the newest version of Arduino IDE and the code that works on Arduino Mega or R3.
However one of the code I use for testing encoder that has include SimpleFOC library in it works well and doesn’t have the error massage. Once I add any code related to motor or driver it will show the error massage again.
Have also tried run the code on other pc, got the same result…
Fault on interrupt or bare metal(no OS) environment
===== Thread stack information =====
addr: 20007e28 data: 00017915
addr: 20007e2c data: 0001772f
If it is then you may need to wait until 1.0.3 of renesas core is released (assuming the fix makes it into that release). You could also try an older version - perhaps this is a regression.
For sure you have to use the dev branch for the moment if you want to use the UNO R4. The code for the Renesas MCU it is using is not yet in the release version of the library.
On the R4 Minima it is working for me.
On the R4 Wifi there is a problem, it crashes.
There seems to be a difference in how the R4 Wifi is using the framework that causes this error.