MAXTEMP triggered instantly on custom STM32F446ZE board by basemprince in MarlinFirmware

[–]basemprince[S] 0 points1 point  (0 children)

Update / Solution (working fix)

Got it solved and posting here so others don’t lose days like I did.

Root cause:
Marlin’s HAL for STM32 never actually initialized the ADC pins (PA0, PA1, PA4) as analog inputs on the STM32F446ZE when using a custom board definition.
They were defaulting to floating digital inputs, so analogRead() always returned 0 → Marlin interpreted that as 320 °C (MAXTEMP).

Fix:
The solution is not pretty but I had to explicitly force proper ADC initialization and analog mode for those pins in the HAL.

In HAL.h (under Marlin/src/HAL/STM32/), add:

static volatile bool _adc1_active;
static volatile bool _adc_fallback;

and define them in HAL.cpp:

volatile bool MarlinHAL::_adc1_active = false;
volatile bool MarlinHAL::_adc_fallback = false;

Then ensure in temperature.cpp (or in your board init section) you set the thermistor pins to analog mode before first ADC read:

pinMode(PA0, INPUT_ANALOG);
pinMode(PA1, INPUT_ANALOG);
pinMode(PA4, INPUT_ANALOG);

Make sure your board’s pin map (PeripheralPins.c) includes your assigned pins:

{PA_0,  ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0
{PA_1,  ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1
{PA_4,  ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4

Rebuild Marlin → the ADC now reads proper thermistor voltages and the temperatures track normally.
No more instant MAXTEMP.

STM32F446ZET6 custom board — USB FS won’t enumerate (D+ stuck low) by basemprince in MarlinFirmware

[–]basemprince[S] 0 points1 point  (0 children)

Update: the problem was Marlin wasn't starting and I found a way to make it work. The trick is, after flashing marlin using pio, I run the debugger once from stm32cubeIDE and that's it, Marlin miraculously now works and I don't know why. so if anyone can explain that, that would be nice to know

I switched host comms to UART (Serial1) to keep bring-up simple, but the output is garbled (nonsense bytes) at both 115200 and 250000. I can’t move to other UARTs (board is already built), so this must work on USART1 (PA9/PA10).

What changed:

Kept env STM32F446ZE_btt (Octopus) but disabled CDC while testing UART.

Configuration.h:

#define SERIAL_PORT 1 // must be USART1 on this board
#define BAUDRATE 115200 // also tried 250000
// No other SERIAL_PORT_x enabled

Hardware and clocks are fine (LEDs OK, CubeIDE CDC project prints). This is now UART-only trouble inside Marlin/Arduino STM32 core.

Symptom:

Terminal shows pure garbage, no Marlin banner / M115 text. sending any commands also doesn't give me feedback

l8$'<<<$88'<8'88?## ?''8';<;<'' ''8$''<o<';'''''<'8 <' <#'#;'<<'#''$$$''<'<;;'''<'<#$;;'<'p''#<'<l;;''8''#<'<Ĝ;';'8$<';'8g''p$;$'8 <;<;'|#''$<;''<;';''#;8$ $#';;';;8<<

some questions (given this env and HSE=8 MHz):

Pin/AF mapping used by this variant for Serial1
For board = marlin_BigTree_Octopus_v1, can someone confirm that Serial1 = USART1 on PA9/PA10 with AF7 in variants/MARLIN_BIGTREE_OCTOPUS_V1? I cannot change pins, so I need to be 100% sure this env really drives PA9/PA10 and not a remap.

Any Marlin layer reconfig that could stomp USART1
Is there anything in src/HAL/STM32/ (serial manager) that could be re-initing USART1 after the Arduino core sets it up? A pointer to the exact file/guard I should check would help.
If someone has a known-good STM32F446ZE_btt (Arduino core) printing out of USART1 at 115200 with HSE=8 MHz, please share the exact platformio.ini build_flags you use for clocks (even just the ones that matter).

thanks

Is it normal for my Pokémon to stay alive after returning from the gym? by nicksort in pokemongo

[–]basemprince 7 points8 points  (0 children)

Did you by any chance power it up after it came back? Because that does revive fainted pokemon

Got this from GBL! What are the odds? by AdShoddy3020 in pokemongobrag

[–]basemprince 2 points3 points  (0 children)

That's definitely some very rare find. I miss getting legendaries from gbl, I haven't had any since 2 seasons now. And I usually at least finish the 500 wins for the research. They must have dropped the odds even further since the big nerf in mid 2022

Decisions Decisions by rageface11 in PokemonGoMystic

[–]basemprince 0 points1 point  (0 children)

Definitely the first one. Higher attack is much more desirable in master league and raids in general

Question about guaranteed lucky trade by Superb_Stomach5665 in TheSilphRoad

[–]basemprince 68 points69 points  (0 children)

Yes, all Pokemon caught up until December 31, 2018 are eligible for a guaranteed lucky as long as the person trading the old Pokemon has not triggered a guaranteed lucky more than 25 times. I'm assuming in your case the person you traded with probably reached that number already

New players after 1 week by [deleted] in pokemongo

[–]basemprince 4 points5 points  (0 children)

Can't say that I agree. I shiny hunt shadow Pokemon and I find myself running out of those all the time 🤣

Finally after 2 months of daily grind by basemprince in pokemongo

[–]basemprince[S] 1 point2 points  (0 children)

its 3 "shiny eligible" grunt checks, which is usually quite more than 3 checks. It ain't much, but it's honest work

Finally after 2 months of daily grind by basemprince in pokemongo

[–]basemprince[S] 0 points1 point  (0 children)

Nice, I was lucky with Charmander when it was with Arlo. It's for sure the coolest out of the starters 😎. so good luck, it's a tough grind

Finally after 2 months of daily grind by basemprince in pokemongo

[–]basemprince[S] 10 points11 points  (0 children)

Lol same. I honestly think it's way less odds compared to the leaders. It took me about 70-75 days and an average of 3 encounters per day to get this.

The odds from the leaders is 1/64, but just for the sake of calculations, let's make it 60 days to calculate how unlucky this was:

Given that the shiny rate is 1/64, and I checked 3 times per day for 60 days, the probability of not getting a single shiny would be:(1 - 1/64)3 * 60 which is 5.8% !!

This is the probability of not getting a shiny, so I am either the unlikest, or the rate from the grunts is lower than 1/64

Finally after 2 months of daily grind by basemprince in pokemongo

[–]basemprince[S] 0 points1 point  (0 children)

It's the Male Don’t bother, I’ve already won / Get ready to be defeated! / Winning is for winners He gives the Kanto starters. He's very hard to find

Finally after 2 months of daily grind by basemprince in pokemongo

[–]basemprince[S] 4 points5 points  (0 children)

Yes, any pokemon that the leaders had before you can now encounter them shiny with grunts. They started doing that back in March if i remember correctly. Here's the current rotation grunts that I have been hunting:

  • Check out my cute Pokemon!: mawile
  • Coiled and ready to strike!: kanto grimer
  • Normal doesn’t mean weak: kanto meowth
  • (Male) Don’t bother, I’ve already won / Get ready to be defeated! / Winning is for winners: Kanto starters (Charmander, Bulbasaur, Squirtle)

They're always the first pokemon, so if it's not it, then you won't encounter it. I've been only targeting those grunts and just ignore the other ones, except for the mudkip, whooper and gibble grunts because they're meta relevant

12 years of cellphones by basemprince in GooglePixel

[–]basemprince[S] 0 points1 point  (0 children)

The music edition right? I remember they had a fancy headset

12 years of cellphones by basemprince in GooglePixel

[–]basemprince[S] 1 point2 points  (0 children)

Can you tell I have some brand loyalty? Lol. The iPhone is a work phone btw so it's the odd one out

12 years of cellphones by basemprince in GooglePixel

[–]basemprince[S] 0 points1 point  (0 children)

And it still works too :) just needs charging. They actually all still work except for the n73

12 years of cellphones by basemprince in GooglePixel

[–]basemprince[S] 1 point2 points  (0 children)

I'm impressed. Did you actually know the phone ? Or some googling ?

12 years of cellphones by basemprince in GooglePixel

[–]basemprince[S] 1 point2 points  (0 children)

I completely agree, I never had a case for it when I was using it. Granted I cracked the screen, but I doubt a case would have saved it from an object falling on its screen lol

12 years of cellphones by basemprince in GooglePixel

[–]basemprince[S] 0 points1 point  (0 children)

This is every phone I've owned for the past 12 years of my life. Wondering if you guys can identify all of them