-
-
Notifications
You must be signed in to change notification settings - Fork 212
Nicla: Powering from battery issue. #421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @gutzchi, |
@gutzchi off topic, but I notice all Arduino MBED bootloaders have .hex files except the NicolaVision and PortentaH7. https://github.com/arduino/ArduinoCore-mbed/tree/master/bootloaders (I have a DAP debugger that needs a .hex file. ) Even the Nano33Ble has a .hex file. Can these be added to the 2 that don't have them? Is that a mistake or should I write a feature request? Noobie type question: Can we burn any binary file (.elf, .bin .hex) using that little hack or is that just for burning bootloaders? |
Hi @hpssjellis, you can actually generate any kind of binary file from the About your second question, the Burn Bootloader command executes a recipe to program the bootloader, taking the binary file from its dedicated path inside the core. |
@giulcioffi I am really sorry for my late reply. My most sincere apologies. I have burnt the new bootloader with the same results as in the previous case. However, as I am not in my lab, I have tried powering it with a 3.3V voltage source (instead of the battery) and surprisingly, it works fine. This might be a hint. |
@gutzchi would you like to try the new core 3.0.0 and let me know if you still have the battery issue? Thanks! |
@giulcioffi Congratulations! It works properly now! If I may ask, what was the problem? |
Oh, finally :) it was due to improper operations done on the Chip Disable pin of the PMIC. |
Hey there @giulcioffi, I am letting you know that the issue still persits if the hardware UART is in use. Here is the simple code (although I doubt it matters), the Nicla is attached to a DFPlayer Mini:
If I run the LED blink, then it works fine with just the battery, without the cable. Edit: I am on MBED 3.0.1 |
Hi @CiprianFlorin-Ifrim, |
@giulcioffi Hey, by "it does not work" I mean, as seen in the video, that the LED blinks 3 times, color blue, then it just stops. And this happens with UART to a module, with UART to a PC or a blink it does work for me as well. In the previous video, you can see the Nicla attached to a DFPlayer Mini which communicated through UART. And it does not work without me reflashing if the battery is connected first, then the usb. If I do the other way around, USB first, then Battery, it does work, after I remove the usb cable. |
Hi @CiprianFlorin-Ifrim, I don't have a DFPlayer Mini, but I uploaded your sketch with some LED activity in the middle, to highlight if the sketch stops somewhere or not
I also connected Nicla Sense UART to a MKR board to read the messages and I see Nicla Sense blinking and the messages exchanged in all the powering setups. |
Hi @giulcioffi, the DFPLayer's UART is connected to Nicla's UART, the Busy pin from DFPlayer to Nicla's GPIO3/P0_10. GND common, and the VIN from DFP to the battery, the battery also connected to the Nicla Sense. In my case, if I add an LED blink in the loop, the code stops just before "myMP3.playFolder(1, 1);". Afterwhich the code is supposed to go from LED blue to LED led, and it does not happen. |
If the LED turns blue and never changes again, then the sketch got stuck inside the playFolder(). |
@giulcioffi In my main sketch, the Busy pin is set to input and LOW, in the Void setup after nicla::begin() and then I have "while (!digitalRead(GPIO3)); which simply blocks the code while the audio file is playing. Nevertheless, the code does not work with the initial example code which does not make use of the busypin/while etc. However, it does work if the USB is connected first, then the battery 1 sec later. Which is the problem I am having. From the led I understood the issue is that as soon as it needs to send the hex code(representing the file to play) to the DFPlayer through UART, it stops. As a separate question, why does the GPIO3 needs to be set high by Nicla:begin and does it affect the board if then in my sketch I have pinMode(GPIO3, INPUT) and digitalWrite (GPIO3, LOW), therefore, reverting the pinmode and digitalwrite from the nicla::begin? |
If the issue in on the UART communication, it's a bit strange that the |
@giulcioffi
I have also checked the voltage from the DFplayer to see that there is no issue. The busy pin and UART have a high of 3.34volts and a low of 0.04 volts. So that should be alright. I also tried disabling/enabling DEBUG mode for the DFPlayer, same situation. Indeed the volume is sent fine, but then it gets stuck in the loop. I have tried 3 different DFPlayer MINI libraries made by the company of the module, and the 2 from 2 users. And all behave the same way. Thanks for letting me know in regards to the MKR Board and why it is setup like that by default. |
Good afternoon.
It seems that the Arduino Nicla does not work properly if powered directly from a battery. If first, it is powered from the USB and then the USB is unplugged while the battery is on, everything is fine.
Moreover, the bootloader seems to work properly as the LED flashes three times every time the reset button is pressed. I am using a 3.7V Li-ion battery.
Has anyone had the same problem?
May it be due to a software configuration of the power IC?
Thank you very much for your cooperation.
The text was updated successfully, but these errors were encountered: