Author Topic: Dev board fail. STM32L4xx what's the point?  (Read 3890 times)

0 Members and 1 Guest are viewing this topic.

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4027
  • Country: gb
Re: Dev board fail. STM32L4xx what's the point?
« Reply #25 on: November 04, 2022, 10:54:51 am »
2.4"  16bit color.  240x320.  152kb per frame.  I have 256kb of flash, so it's only at 75%.

Loading is down with a split buffer for SPI. Even rows write to the front, odd rows to the rear, sent via DMA.  Only Even rows wait for Tx complete before writing.  You can just notice the BMP draw, but you need to be paying attention.  It takes it less than an eye blink.  Good ole DMA controllers.

I did consider the IL9341 has an SD card slow on the back.  I still am tempted to try it.  However it's a full sized SSD slot and I've been told that the newer high speed media cards XC might not work with raw SPI, some might not run at 3.3V and mean I need to dig for 5V tolerance on SPI ... and make sure the TFT is okay with 5V SPI as well.  Maybe next time.  A single background will do for this.

All I have left to do is make a box for it on Fusion360 and he fun part.... design the xmas day animation when sleeps = 0.

It's completely "mickey mouse", but that was the intent.  A learning project that has an actual, even remotely, purposeful outcome.

EDIT: On fusion 360... hadn't done any in over a year, was expecting days or work.  Then I remembered how fusion works, so I loaded the last box I made and went through and edited all the dimensions under "Parameters" and bingo, new box.  Just need to cut the hole in the lid for the screen and add fixing tabs/screw holes.

Since this is a module + dupont creation, I had to make a power distribution and pull up board.  It's so cute, it's funny.  1.5cm square bit of proto board with 3 pull ups, 3Vcc, 3Gnd and a huge 220uF 20V cap to try and stop the screen back light "twitching" when the MCU wakes up!
« Last Edit: November 04, 2022, 10:58:59 am by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline bson

  • Supporter
  • ****
  • Posts: 2269
  • Country: us
Re: Dev board fail. STM32L4xx what's the point?
« Reply #26 on: November 04, 2022, 08:39:28 pm »
This is somewhat tangential, but I'd use WFE rather than WFI.  If you get an interrupt it's exactly the same as WFI - the interrupt is handled normally.  But it can also wake without an actual interrupt, this is useful when you just want to wait for say a timer but don't really need an interrupt handler.  WFI requires a dummy no-op interrupt handler and so adds the latency of a dummy exception state save and load.  WFE is gated by any interrupt, or peripheral event enable bits that are similar to the interrupt enable bits (except they only create wake events, not interrupts).

By removing the interrupt processing overhead you can run at a lower clock, which saves power.  The less you have to do, the more you save.
 

Online peter-h

  • Super Contributor
  • ***
  • Posts: 3694
  • Country: gb
  • Doing electronics since the 1960s...
Re: Dev board fail. STM32L4xx what's the point?
« Reply #27 on: November 04, 2022, 10:46:18 pm »
Consider a different way of saving power.

Use a normal CPU and turn it off. Actually shut down the supply to it with a MOSFET. Run it just 1% or 0.1% of the time.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline dietert1

  • Super Contributor
  • ***
  • Posts: 2053
  • Country: br
    • CADT Homepage
Re: Dev board fail. STM32L4xx what's the point?
« Reply #28 on: November 15, 2022, 01:27:20 pm »
Meanwhile i replaced two STM32F103 on bluepill modules by STM32L433CCT3 (available from Farnell). One because it had a fake MCU that insisted to be a Cortex-M4.
The other one after wasting hours trying to use the screwed STM32F103 I2C peripheral. Later i also fixed the Boot0 resistor R3 from 100K to 10K to make it work reliably.

The STM32L433 is a good match, works without any hardware mods. It runs USB and I2C out of the box (CubeMX design).

Regards, Dieter
« Last Edit: November 15, 2022, 03:15:27 pm by dietert1 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf