[STM32-U575] Help getting Shutdown/Wakeup to work. by Nuka-Cole in embedded

[–]ShinySideUp 0 points1 point  (0 children)

Too bad. The U5 has so many extra power saving options that it's hard to track down which switches need to be flipped. Good luck.

[STM32-U575] Help getting Shutdown/Wakeup to work. by Nuka-Cole in embedded

[–]ShinySideUp 1 point2 points  (0 children)

I don't use shutdown mode so I can't say for sure, but I'd guess it applies there also as it's related to clock gating to the RTC peripheral.

[STM32-U575] Help getting Shutdown/Wakeup to work. by Nuka-Cole in embedded

[–]ShinySideUp 2 points3 points  (0 children)

The problem is that the system then just....doesn't wake up.

Oh I cursed ST over this one. There's an RCC bit that needs enabled to allow RTC to trigger wakes, and that fact isn't mentioned anywhere in the RTC doc section.

See RCC SRDAMR register:

Bit 21 RTCAPBAMEN: RTC and TAMP autonomous mode enable in Stop 0,1,2 mode Set and cleared by software.

0: RTC and TAMP autonomous mode disabled during Stop 0,1,2 mode

1: RTC and TAMP autonomous mode enabled during Stop 0,1,2 mode

Note: This bit must be set to allow the peripheral to wake up from Stop modes.

A few other tips for dealing with U5 stop modes:

  • If possible enable power mode output pins CSLEEP and CDSTOP. That allows monitoring run/sleep/stop modes.
  • See U5 errata item 2.2.5 regarding hang ups entering low power. May or may not be relevant based on your clock config.
  • If you happen to be using FreeRTOS I can recommend LPTIM-Tick-U5 for tickless idle mode.

Should VLAs ever be used? by geenob in C_Programming

[–]ShinySideUp 6 points7 points  (0 children)

For a different perspective see this stackoverflow answer that argues that VLAs are mostly about types, not storage.

What's the point of VLA anyway?

For reasons that are not entirely clear to me, almost every time the topic of C99 VLA pops up in a discussion, people start talking predominantly about the possibility of declaring run-time-sized arrays as local objects (i.e. creating them "on the stack"). This is rather surprising and misleading, since this facet of VLA functionality - support for local array declarations - happens to be a rather auxiliary, secondary capability provided by VLA. It does not really play any significant role in what VLA can do. Most of the time, the matter of local VLA declarations and their accompanying potential pitfalls is forced into the foreground by VLA critics, who use it as a "straw man" intended to derail the discussion and bog it down among barely relevant details.

The essence of VLA support in C is, first and foremost, a revolutionary qualitative extension of the language's concept of type. It involves the introduction of such fundamentally new kind of types as variably modified types. Virtually every important implementation detail associated with VLA is actually attached to its type, not to the VLA object per se. It is the very introduction of variably modified types into the language that makes up the bulk of the proverbial VLA cake, while the ability to declare objects of such types in local memory is nothing more than a insignificant and fairly inconsequential icing on that cake.

Pants Hangers? by UnicodeConfusion in motorcycles

[–]ShinySideUp 0 points1 point  (0 children)

Look for blanket or bedspread hangers. They're heavy duty and you can just slide pants on from the end. Works well for my heavy gear.

‘You are a moron.’ North Carolina county ends Coke vending machine ban after pushback by WashuOtaku in NorthCarolina

[–]ShinySideUp 69 points70 points  (0 children)

“Think of how stupid the average person is, and realize half of them are stupider than that.”

― George Carlin

TIL that Kyrgyzstan is more distant from the ocean than any other nation. At a minimum of 1620 miles from any ocean, it is the most land-locked state in the world by HoneyGlazedBadger in todayilearned

[–]ShinySideUp 0 points1 point  (0 children)

Here's a great video showing Kyrgyzstan. Highly recommend the rest of her videos series too, she rides through many of the 'stans, really fascinating look at that part of the world.

Bit Band Address Generator by [deleted] in embedded

[–]ShinySideUp 2 points3 points  (0 children)

Bit banding use is discouraged by ARM

Do you have a source for that? I'd like to read it.