I want to use Mbed Studio for writing program for X_NUCLEO_IHM03A1 with NUCLEO-L476RG board using official library and example for 1 motor. Library as I understood supports only mbed os 2. In the same time Mbed Studio can work only with mbed os 5.
After compiling project my device rebooting with following message:
++ MbedOS Error Info ++
Error Status: 0x80010133 Code: 307 Module: 1 Error Message: Mutex: 0x20000578, Not allowed in ISR context
Location: 0x800E6DD
Error Value: 0x20000578
Current Thread: main Id: 0x20002018 Entry: 0x800B90D StackSize: 0x1000 StackMem: 0x200008E0 SP: 0x20001600
For more info, visit: https://mbed.com/s/error?error=0x80010133&tgt=NUCLEO_L476RG -- MbedOS Error Info -- = System will be rebooted due to a fatal error =
= Reboot count(=1) reached maximum, system will halt after rebooting
So, I thought maybe this are solutions:
1) to rewrite library somehow so it will work with MBED OS 5 (I am not sure what exactly have to be modified)
2) use mbed os 2 in Mbed Studio (not sure if it is possible)
X_NUCLEO_IHM03A1 library - https://os.mbed.com/teams/ST/code/X_NUCLEO_IHM03A1/
How to solve the problem so compiled in Mbed Studio project for X_NUCLEO_IHM03A1 could work?
Commenting the line __disable_irq(); solved the problem Thank you Nils4526
in my case the function was in the PowerStep01.h file and looked like this:
void Powerstep01_Board_DisableIrq(void)
{
// __disable_irq();
}
I got the same error code that you have but with the expansion board IHM01A1 and the Nucleo board F411RE. I don't know if this will work for your board but I think it is worth a try. The names are different but besides that the code looks similar.
Using the bare metal profile works without any modification but this change works with OS5 as well.
In the file Components/L6474/L6474.h comment out the following line:
void L6474_DisableIrq(void)
{
// __disable_irq();
}
This function is called in the main file when reading or writing with SPI.
I don't know why it works since the Mbed API asks you to disable interrupts before using the SPI write function, but somehow removing this line that disables the interrupt makes it work.
User contributions licensed under CC BY-SA 3.0