Replies

This profile is from a federated server and may be incomplete. Browse more on the original instance.

foone, to random
@foone@digipres.club avatar

I should be able to charge my phone over PoE from my laptop. I don't know why it would have this feature, but it should

azonenberg,
@azonenberg@ioc.exchange avatar

@foone I would love a laptop with dual mode PoE that can either power peripherals from the laptop, or charge the laptop.

azonenberg, to random
@azonenberg@ioc.exchange avatar

Finally got around to making a proper image version of the meme.

azonenberg,
@azonenberg@ioc.exchange avatar

New horrible idea: use some combination of RAII wrappers and macros to make a "unsafe" block for C++ that disables and re-enables data faults within the active scope.

{
unsafe
//do stuff that might segfault here
}

azonenberg, (edited )
@azonenberg@ioc.exchange avatar

class FaultDisabler
{
public:
FaultDisabler() { sr = SCB_DisableDataFaults(); }
~FaultDisabler() { SCB_EnableDataFaults(sr);}
protected:
uint32_t sr;
};

unsafe FaultDisabler fd;

azonenberg,
@azonenberg@ioc.exchange avatar

@whitequark is this sufficiently cursed to earn your eldritch horror seal of approval?

azonenberg,
@azonenberg@ioc.exchange avatar

@whitequark I meant more the "i wrote code so memory unsafe i needed to add the unsafe keyword to c++ for it to work"

azonenberg,
@azonenberg@ioc.exchange avatar

@whitequark Yeah I'm only accessing valid memory locations. I just sometimes get a PSLVERR or whatever the AXI equivalent is in return.

azonenberg,
@azonenberg@ioc.exchange avatar

@whitequark Testing it out, seems to do what I wanted so far...

azonenberg,
@azonenberg@ioc.exchange avatar

@Xilokar @felix STM32L4 and H7 are the near term platforms. But probably a lot of other newer STM32s too.

azonenberg,
@azonenberg@ioc.exchange avatar

@Xilokar @felix Yeah I actually am building a power-loss fuzzer for validating this code more extensively. Basically two STM32's with one controlling reset and a load switch to the second.

DUT will be reading and writing flash in a loop and checking that all transactions atomically succeed or fail and there's no segfaults.

azonenberg,
@azonenberg@ioc.exchange avatar

@Xilokar @felix It's 10K for these parts and that's one of the reasons microkvs is a log structured FS (many object writes -> one flash P/E cycle).

That said, the power loss fuzzer board is something I intend to test to destruction to check, among other things, how it fails in the case of media wear-out.

But the STM32L431 is 2 kB per flash erase block and I have 128 erase blocks, I think, to work with.

So i can test a 2-block KVS to destruction then repeat another test regimen at a different flash block and get a lot of testing done before I completely fry the chip.

At which point I can hot air it off (just a 32qfn) and put on another if the situation dictates. And the worn out one will become microscope food.

azonenberg,
@azonenberg@ioc.exchange avatar

@Xilokar @felix ECC block size is 8 bytes (STM32L431) and 32 bytes (STM32H735) for my two main MCUs of interest.

MicroKVS is a log structured design that ping-pongs two flash blocks, appending data objects to one block (metadata storage in the start of the block then object content in the rest) until it's full, then moving the latest version of each object to the second block and erasing the first.

It's the smallest, simplest design you can get while still having power loss protection (i.e. you need a minimum of two erase blocks).

azonenberg,
@azonenberg@ioc.exchange avatar

@nolanl I actually made two versions. The newer one declares it in an "if" scope: if(FaultDisabler fd; 1)

azonenberg,
@azonenberg@ioc.exchange avatar

@nolanl Which looks more like the Rust version, or the general c++ control flow.

The old version, if you look carefully, had the "unsafe" as the first line inside the curly braces and not used as a control statement.

tnt, to random
@tnt@chaos.social avatar

Finally taped-out a personal project on 🎉

This is a differential receiver that should hopefully work up to 500 MBps. ATM it doesn't have any CDR or anything, it just takes clk/data pair and gearbox down 1:16 ... Having some CDR is next 😅

azonenberg,
@azonenberg@ioc.exchange avatar

@tnt @dsvf I have no idea about PHY or PLL analog design but will gladly help with RTL for line coding, gearboxing, 8b10b or 64b66b block sync, etc.

Are you building a transmitter too?

aud, to random

Gonna write a JavaScript interpreter that becomes exponentially slower the more lines of JS code it has to load

people need to learn

azonenberg,
@azonenberg@ioc.exchange avatar

@aud new optimization technique: eval( <2 MB obfuscated minified one-liner> )

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines