Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

PMC freeze when using ArduinoBLE with Arduino_MachineControl included. #73

Closed
Bylund opened this issue Oct 12, 2021 · 7 comments · May be fixed by arduino-libraries/ArduinoBLE#327
Closed
Assignees
Labels
conclusion: resolved Issue was resolved type: imperfection Perceived defect in any part of project

Comments

@Bylund
Copy link

Bylund commented Oct 12, 2021

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.

To reproduce

  1. Upload the Portenta BLE example without changes (https://docs.arduino.cc/tutorials/portenta-h7/por-ard-ble).
  2. Verify functionality. (Optional).
  3. Include header file Arduino_MachineControl.h. (#include <Arduino_MachineControl.h>)
  4. Upload sketch and note that the Portenta Machine Control will freeze.

Library versions used

  • ArduinoBLE v1.2.1.
  • Arduino_MachineControl v1.1.0.

Additional context

Additional reports

@per1234 per1234 added the type: imperfection Perceived defect in any part of project label Nov 12, 2021
@pitdagosti
Copy link

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.

@gmacario

This comment was marked as duplicate.

@per1234
Copy link
Contributor

per1234 commented Nov 26, 2022

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() {}

@chminhph
Copy link

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.

@rickypid

This comment was marked as duplicate.

@leonardocavagnis
Copy link
Collaborator

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.

@leonardocavagnis leonardocavagnis self-assigned this Nov 22, 2023
leonardocavagnis referenced this issue in arduino/mbed-os Nov 30, 2023
the standard one from Cypress driver is fine
@leonardocavagnis
Copy link
Collaborator

ArduinoCore-mbed release 4.0.10 fixes this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
conclusion: resolved Issue was resolved type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants