You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing on registers using the following code, the results tells the the read/write from won't work unless I go hardcore on ptr::read or ptr::write.
Maybe I'm using the wrong register, but I'm using stm32l4::stm32l4x3::SPI2::PTR as a reference 🤔
When writing with prt::write, it actually works on ptr::read but not on the dp read, always zero
Am I missing something?
Context: was trying to use some SPI crate and the result was very random all the time, could not pinpoint the error so started digging down
Seems there is something wrong with your code as the decimal value 1073756160 = 0x40003800 , so I suspect you are just reading the variable you have declared, and not the memory adress it points to.
Also you should make sure that the SPI2 device is actually enabled by setting SPI2EN bit in APB1ENR1 register, otherwise the memory mapped registers typically will just read 0.
Something seems to be off.
When writing on registers using the following code, the results tells the the read/write from won't work unless I go hardcore on
ptr::read
orptr::write
.Maybe I'm using the wrong register, but I'm using
stm32l4::stm32l4x3::SPI2::PTR
as a reference 🤔When writing with
prt::write
, it actually works onptr::read
but not on thedp
read, always zeroAm I missing something?
Context: was trying to use some SPI crate and the result was very random all the time, could not pinpoint the error so started digging down
Resulting in
The text was updated successfully, but these errors were encountered: