Bluepill and battery...

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
Post Reply
Angr77
Posts: 11
Joined: Sat Dec 01, 2018 9:05 pm

Bluepill and battery...

Post by Angr77 » Thu Mar 14, 2019 6:25 pm

Hi!

I am fighting with a small project using a bluepill board, 2.4” ILI9341 display, touch and sdcard.

I have got everything to work fine (using GUI slice for the GUI using touch) in my special application. The display is using SPI 1, and the touch and the SDcard is using SPI 2 on my blue pill board)

But I needed to use the RTC clock in my app found on the blue pill board...and after some real fighting...just enabling the rtclock.h library...made the display to get just white...but I think I solved this...but it feels it does not work 100%...sometimes it still just leaves the Tft display white after posting updating the code(using st link). But it looks like in this cases that the touch is working...and the program executing)

Ok, to the real problem...I wanted also to place a small battery for the RTC clock as backup..keeping the time when the system is off. But when attaching a cr2032 pen battery...to vbat and ground...the TFT goes white immediately. There is no way to get the display working...unless disattaching the battery again...

Have anybody on this nice forum experienced a similar scenario?

Best regards

Anders

MoDu
Posts: 114
Joined: Mon Jul 16, 2018 1:51 pm

Re: Bluepill and battery...

Post by MoDu » Fri Mar 15, 2019 10:38 am

Likely, you're updating the screen while an interrupt from the RTC fires and the whole thing gets garbled?

Angr77
Posts: 11
Joined: Sat Dec 01, 2018 9:05 pm

Re: Bluepill and battery...

Post by Angr77 » Fri Mar 15, 2019 12:57 pm

Hi! Thanks for the input!

It is a bit hard to tell really whats is happening when connecting the battery to the blue pill board. (I am not using any diodes / capacitors on my design from the battery against the VBAT & Ground - But I will try this also and see if things improves)

It could be some kind interrupt with the RTC causing it...but I think I am not doing anything special in the code. The subroutine when reading the RTC and post the info in a log file on the SD card is not happening at boot up. The screen goes white when booting up when the battery is attached). The RTCLock.h is of course inititate at bootup...but nothing else.

Hmm...I have to think about this!

Best Regards

Anders

User avatar
BennehBoy
Posts: 886
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Bluepill and battery...

Post by BennehBoy » Fri Mar 15, 2019 1:09 pm

Perhaps wrap the screen drawing code with disable and enable interrupt calls.
-------------------------------------
https://github.com/BennehBoy

Post Reply