0
\$\begingroup\$

led is on but UART doesn't work when using lithium battery. stm32f437 UART can work at 5V(power supply).

#include "mbed.h"
#include "math.h"
#include "string.h"
#include "stdio.h"
DigitalOut g1(PD_0);
Serial drive(PA_9,PA_10);
void bleread(void);
char blerx[20];

int main(void){
  g1=1;//green led on
  drive.baud(9600);
  drive.attach(&bleread,Serial::RxIrq);   
  while(1);
}
void bleread() {
  drive.scanf("%s",blerx);
  if(blerx[0]=='r')drive.printf("hello");
}

enter image description here

enter image description here Does third picture's power supply correct? enter image description here

\$\endgroup\$
  • \$\begingroup\$ This battery charging circuit looks potentially dangerous to me. I would replace it with something that does a proper job of limiting voltage and current for charging a LiPo cell. \$\endgroup\$ – Elliot Alderson Jun 22 at 11:54
  • 1
    \$\begingroup\$ Also, where are the bypass capacitors? I would be surprised if this circuit works at all. \$\endgroup\$ – Elliot Alderson Jun 22 at 11:55
  • 1
    \$\begingroup\$ Not only is the charging circuit hazardously unsafe, the minute the 5v source is connected the MCU will be risk from overvoltage via the improper D1 bypass. Beyond that the MCU circuit is just about entirely wrong. It's probably best to remove the battery for charging, use a low quiescent current regulator, and pay attention to the MCU circuit requirements. \$\endgroup\$ – Chris Stratton Jun 22 at 15:44
6
\$\begingroup\$

The operating voltage range is 1.8 to 3.6 Volts. It means that if the supply voltage is any higher than 3.6 Volts, the device might malfunction.

There is an absolute maximum rating of 4.0 Volts. It means that the device will survive a supply voltage up to 4.0 Volts without permanent damage, and will be able to function again after a reset. Above 4.0 Volts you can expect permanent damage.

There are 5V tolerant I/O pins on the device, so it can work with I/O signals up to 5V, but the power must still be in the 1.8V-3.6V range.

You can check the exact power requirements in the Electrical characteristics chapter of the datasheet.

Also note that all VDD pins should be connected to the power source, not just one of them. Check the decoupling capacitor requirements too.

\$\endgroup\$
  • 4
    \$\begingroup\$ Not only do all supply pins need to be connected, VCAP is required. And Boot should be deterministically connected... basically in addition to a dodgy power scheme this circuit shows a complete lack of understanding of how to use this MCU. There are some pretty low quiescent current regulators available now... \$\endgroup\$ – Chris Stratton Jun 22 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.