ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
starblue has quit [Ping timeout: 255 seconds]
starblue has joined #rust-embedded
thomas25- has quit [Server closed connection]
thomas25 has joined #rust-embedded
IlPalazzo-ojiisa has quit [Remote host closed the connection]
WSalmon has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
WSalmon has joined #rust-embedded
Guest7221 has left #rust-embedded [Error from remote client]
emerent has quit [Ping timeout: 258 seconds]
emerent_ has joined #rust-embedded
emerent_ is now known as emerent
GrantM11235[m] has quit [Quit: Idle timeout reached: 172800s]
notgull has quit [Ping timeout: 240 seconds]
notgull has joined #rust-embedded
korken89[m] has quit [Quit: Idle timeout reached: 172800s]
notgull has quit [Ping timeout: 260 seconds]
notgull has joined #rust-embedded
lulf[m] has quit [Quit: Idle timeout reached: 172800s]
inara` has quit [Server closed connection]
inara has joined #rust-embedded
crabbedhaloablut has joined #rust-embedded
MathiasKoch[m] has quit [Quit: Idle timeout reached: 172800s]
Guest7221 has joined #rust-embedded
korken89[m] has joined #rust-embedded
<korken89[m]> Does anyone know if there is a Cortex-M wide limit on minimal write for the NVM controllers? I've been testing now on STM32L4 and nRF52 and both seem to support flipping an arbitrary 1 -> 0 even if other bits in the same byte are 0. Does this hold for all NOR based MCUs or are these two special?
<korken89[m]> Making algorithms that can utilize bit clearing operations is quite nice, instead of allocating a full byte.
<Lumpio-> NVM as in Flash? I would hazard a guess that the ARM spec says nothing about that
<Lumpio-> Probably entirely up to the implementor
ithinuel[m] has joined #rust-embedded
<ithinuel[m]> From the Cortex-m perspective it doesn't matter if it's an nvm or ram etc. (The reference soc implemented on the FPGA based MPs boards mainly use ram as the code area).... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/rCunATtsrYkdYhvShJcyGlBj>)
<dirbaio[m]> it's very vendor dependent
<dirbaio[m]> you have to check the docs
<dirbaio[m]> nrf52840 only allows writing each 32bit word twice.
<korken89[m]> Oh interesting, do of I try to flip 3 bits it will error
<korken89[m]> s/do/so/, s/of/if/
<korken89[m]> In 3 operations I mean
<dirbaio[m]> nrf52832 only allows 181 32bit word writes on each 512 byte block between erases 🤪
<korken89[m]> Lol
<dirbaio[m]> well, it doesn't error. I tried it and it works anyway, but it's not guaranteed to work every time
<korken89[m]> Do you know the keyword to search for in the docs?
<korken89[m]> I looked in the 52833 but could not really find anything 😅
<korken89[m]> (the one I'm testing on)
<dirbaio[m]> "The same 32-bit word in flash memory can only be written n WRITE number of times before a page erase must be performed."
<dirbaio[m]> seems '833 is the same
<dirbaio[m]> also there's flash with ECC, where typically you can only write each word once.
<dirbaio[m]> some STM32s have that
<korken89[m]> Interesting, thanks for the insight :D
<ithinuel[m]> dirbaio[m]: Off-topic: is infocenter a generic product ? :o
<korken89[m]> So to be safe between MCUs, one should even allocate a word per writable status you want
<dirbaio[m]> so if you want max portability, better to stick to "write only once" 🥲
<dirbaio[m]> yep
<korken89[m]> Alright, portability vs efficiency
<dirbaio[m]> also ECC words tend to be annoyingly larger. I think stm32s are 64bit (or 128bit?)
<korken89[m]> Uhoh 😅
<dirbaio[m]> so you can't even write one 32bit half now, the other 32bit half later
<korken89[m]> I think the L4i have should have that
<korken89[m]> Maybe I've not enabled ECC
<korken89[m]> I'll look is there are settings
IlPalazzo-ojiisa has joined #rust-embedded
<JamesMunns[m]> Yeah, I was wondering about this recently too. Many external SPI flash chips don't quote a limit like that, but I've been nervous writing at smaller than byte resolution (or ever multiwriting a single byte more than once)
<korken89[m]> Hehe
<fu5ha[m]> It seems setting the slew rate and drive strength of the spi data, clock, and cs pins all to fast and 8mA has solved it :D thejpster thanks for the help! Also jannic thanks for pointing me in the right direction of what to search for to actually configure that :)
<dirbaio[m]> <JamesMunns[m]> "Yeah, I was wondering about this..." <- oh yeah... the qspi flash chip I'm using (mx25something, same as in the nrf dk's)
<dirbaio[m]> * nrf dk's) doesn't quote a limit
<dirbaio[m]> but it doesn't say that multiwrite is allowed either
<dirbaio[m]> so does that mean it's not allowed? or it's allowed with no limit...??? 🤷
<JamesMunns[m]> Yeah, Ive never seen a (q)spi chip quote a limit :p
<dirbaio[m]> i'm just not doing it, just in case
<dirbaio[m]> (using it with EKV, and I made EKV not require multiwrite for portability)
<JamesMunns[m]> dirbaio[m]: Same lol, I also test that multiple writes to bytes in the same page work too :p
<JamesMunns[m]> (writes at different times, like erasing once, then writing to the same page at significantly different times, maybe even between erases of other sectors/blocks)
<JamesMunns[m]> I wonder what internal flash parts are doing differently to have limits like that :p
<korken89[m]> <dirbaio[m]> "also ECC words tend to be..." <- This was good catch, the L4 I was testing on had 64bit - and I had a if statement to check for success and a print so to test this faster i reduced logging
<korken89[m]> Just that the if statement always returned true xD
<korken89[m]> Sadness, so it means for the bootloader I need to be careful to check what it does
<korken89[m]> I should give embassy-boot a try though, extending it with signature support might be easier
<dirbaio[m]> it already has some basic support for checking ed25519 signatures
<korken89[m]> Oh
<korken89[m]> Ah yes, it's based on salty and dalek
<korken89[m]> I wonder if there is any smaller SHA512 implementation, the sha2 one takes 22kB
<korken89[m]> That's the only thing than causes me to eye P256, including SHA256 it's 12kB
<korken89[m]> <dirbaio[m]> "it already has some basic..." <- Oh it does the signature check on the firmware side, not the bootloader side
StudioChat93 has joined #rust-embedded
StudioChat93 has quit [Client Quit]
notgull has quit [Ping timeout: 246 seconds]
notgull has joined #rust-embedded
jasperw has quit [Server closed connection]
jasperw has joined #rust-embedded
Socke has quit [Ping timeout: 255 seconds]
Guest7221 has left #rust-embedded [Error from remote client]
Socke has joined #rust-embedded
M9names[m] has quit [Server closed connection]
M9names[m] has joined #rust-embedded
mabez[m] has quit [Quit: Idle timeout reached: 172800s]
ryan-summers[m] has quit [Quit: Idle timeout reached: 172800s]
Guest7221 has joined #rust-embedded
euphemism[m] has quit [Quit: Idle timeout reached: 172800s]
Guest7221 has left #rust-embedded [Error from remote client]
firefrommoonligh has quit [Quit: Idle timeout reached: 172800s]
JamesMunns[m] has quit [Server closed connection]
JamesMunns[m] has joined #rust-embedded
Guest7221 has joined #rust-embedded
barafael[m] has quit [Quit: Idle timeout reached: 172800s]
Guest7221 has left #rust-embedded [Error from remote client]
IlPalazzo-ojiisa has quit [Remote host closed the connection]
Guest7221 has joined #rust-embedded
crabbedhaloablut has quit []
_whitelogger has quit [Server closed connection]
_whitelogger has joined #rust-embedded