PMC freeze when using ArduinoBLE with Arduino_MachineControl included.
Portenta Machine Control (PMC) crash when the begin function is called for the ArduinoBLE library when Arduino_MachineControl.h is included in the same sketch.
How to replicate the issue:
- Upload the Portenta BLE example without changes (https://docs.arduino.cc/tutorials/portenta-h7/por-ard-ble).
- Verify functionality. (Optional).
- Include header file Arduino_MachineControl.h. (#include <Arduino_MachineControl.h>)
- Upload sketch and note that the Portenta Machine Control will freeze.
Library versions used:
- ArduinoBLE v1.2.1.
- Arduino_MachineControl v1.1.0.
I have the same issue, the portenta not only freezes but stop working, causing also the computer not to recognise the device. In case this happens, use the bootloader mode (pushing two times fast the reset button) and the computer will reload the portenta.
Hello,
Are there any updates on this subject?
I'll provide a minimal sketch that will produce the Mbed OS crash reported here:
#include <Arduino_MachineControl.h>
#include <ArduinoBLE.h>
void setup() {
BLE.begin();
}
void loop() {}
Hello, Remove EncoderClass out of Arduino_MachineControl\src\Arduino_MachineControl.h and its object out of Arduino_MachineControl\src\Objects.cpp. The issue will be solved. Because of I don't use the Encoder now so It can be a temp solution. I hope it is a key for someone will fix it in the future.
Hello, I have the same problem. Are there any updates on this issue?
Dear all, Thanks for reporting this malfunction. The problem is caused by an interrupt conflict between PMC Encoder pins and BLE pins dedicated to low power management. This issue will be fixed allowing the user to disable the low power mode of the BLE chip before starting the BLE stack. The function to manage BLE low power mode will be available in the new release of the ArduinoBLE library.
ArduinoCore-mbed release 4.0.10 fixes this issue.