<re_irc>
<@luojia65:matrix.org> Looks like we only have blocking write traits here:
lehmrob has quit [Ping timeout: 240 seconds]
crabbedhaloablut has quit []
crabbedhaloablut has joined #rust-embedded
lehmrob has joined #rust-embedded
starblue has quit [Ping timeout: 256 seconds]
starblue has joined #rust-embedded
IlPalazzo-ojiisa has joined #rust-embedded
justanotherdude2 has joined #rust-embedded
justanotherdude2 has quit [Read error: Connection reset by peer]
justanotherdude2 has joined #rust-embedded
justanotherdude2 has quit [Ping timeout: 240 seconds]
lehmrob has quit [Ping timeout: 256 seconds]
lehmrob has joined #rust-embedded
emerent has quit [Ping timeout: 240 seconds]
emerent has joined #rust-embedded
lehmrob has quit [Remote host closed the connection]
<re_irc>
<@urhengulas:matrix.org> Hi đź‘‹
<re_irc>
Jonathan told me that you are looking into switching from bors to github merge queue as well. I am looking into this for knurling-rs.
<re_irc>
To me it seems rather straight forward: Enabling the merge queue in the branch protection rules and adapting the github actions workflow to listen on merge_group events. See here: https://github.com/knurling-rs/defmt/pull/756
<re_irc>
Did you find any additional necessary steps? Or do you have any concerns?
<re_irc>
<@ryan-summers:matrix.org> It kinda depends on what you're doing. I just did this swapover for running HITL via bors, and discovered that you can actually mark checks as "skip" for the PR process and only run them if the "merge_group" is the trigger, which is useful for jobs you only want to run from the queue
<re_irc>
<@ryan-summers:matrix.org> And then you obviously have to set up the merge queue settings in the repo settings as well
<re_irc>
<@ryan-summers:matrix.org> Because we'd overburden the hardware test machine if we ran on every commit
<re_irc>
<@ryan-summers:matrix.org> This also ensures that the private runner cannot have jobs triggered on it by users who are unauthorized, which a normal check would do
<re_irc>
There's no output however on the RTT console. I'm not sure whether or not that VL53L0X sensor is working properly, or that it has already been fried due to my previous failed attempts. Any thoughts?
<re_irc>
There's no output however on the RTT console. I'm not sure whether or not that VL53L0X sensor is working properly, or that it has already been fried due to my previous failed attempts. Any thoughts?
<re_irc>
<@rin_shima:cryptty.tk> Hello! I worked on my code from last time and this time it could built perfectly:
<re_irc>
```
<re_irc>
#![no_std]
<re_irc>
#![no_main]
<re_irc>
use core::*;
<re_irc>
use hal::Twim;
<re_irc>
use nrf52832_hal as hal;
<re_irc>
use rtt_target::{rprintln, rtt_init_print};
<re_irc>
There's no output however on the RTT console. I'm not sure whether or not that VL53L0X sensor is working properly, or that it has already been fried due to my previous failed attempts. Any thoughts?
<re_irc>
<@juliand:fehler-in-der-matrix.de> You could try writing some sort of output to an LED or put a print statement before all the sensor stuff. Then you can at least check whether or not the RTT and the sensor alone work.
<re_irc>
<@joelsa:fehler-in-der-matrix.de> You don’t seem to have pull-ups in place, does that breakout board has them integrated?
<re_irc>
<@juliand:fehler-in-der-matrix.de> : The code says "into floating input"...
<re_irc>
<@joelsa:fehler-in-der-matrix.de> These ST ToF Sensors Need notoriously strong pull-ups, the Datasheet specifies 1.5k to 2k IIRC, though I normally use 4.7k on them
<re_irc>
<@rin_shima:cryptty.tk> : You mean that I shouldn't leave the pins floating? please elaborate
<re_irc>
<@joelsa:fehler-in-der-matrix.de> I2C is Open-Drain so you need Pull-Up resistors to 3V3
<re_irc>
<@rin_shima:cryptty.tk> : hmm but I don't think it's an issue for I'm using a development board...
<re_irc>
<@juliand:fehler-in-der-matrix.de> Why should this not be a problem then?
<re_irc>
<@joelsa:fehler-in-der-matrix.de> It seems to have a level shifter circuit that also includes 10k Pull-Ups
<re_irc>
<@ryan-summers:matrix.org> But I2C likely still shouldn't be input pins
<re_irc>
<@rin_shima:cryptty.tk> : I'm using a prebuilt sensor module with pins already soldered and I think just wire them to the board accordingly will do the job...
<re_irc>
<@therealprof:matrix.org> : Generic development boards don't include the strong pull-ups by default usually. Some MCUs include software controlled pull-ups which are quite weak usually, though.
<re_irc>
<@ryan-summers:matrix.org> I2C are open-drain outputs generally. You won't be able to act as the I2C master with input pins, would you?
<re_irc>
<@ryan-summers:matrix.org> I.e. you could not generate clock cycles etc.
<re_irc>
<@juliand:fehler-in-der-matrix.de> I was wondering that, as well. Depends on the magic dev board, I guess :D
<re_irc>
<@ryan-summers:matrix.org> I don't think that's something the dev board can ever solve
<re_irc>
<@ryan-summers:matrix.org> : Are you intentionally specifying SCL and SDA as inputs? This is not typical
<re_irc>
<@rin_shima:cryptty.tk> : ... what do you mean...?
<re_irc>
<@joelsa:fehler-in-der-matrix.de> These 10k resistors probably work in about 90% of the cases, depending on bus capacitance. If I am Troubleshooting, I don’t want to bet on my setup not belonging to the 10%, though you Setup doesn’t look like it’s high-capacitance, better to add a 2k Pull-Up and be safe than sorry.
<re_irc>
<@ryan-summers:matrix.org> You specify them as "into_floating_input()" which configures the GPIOs as input pins. Generally, you need to configure I2C pins as output pins or alternate function pins
<re_irc>
<@ryan-summers:matrix.org> But the nRF reference manual will tell you what you're supposed to do.
<re_irc>
<@ryan-summers:matrix.org> nRFs also use something called a pin mux to route the I2C to the IO pins. It should tell you how you're supposed to configure the pins first somewhere
<re_irc>
<@rin_shima:cryptty.tk> : But according to the "TWIM" section in the nrf52832 specification, these two i2c pins are both listed at 'input'...
<re_irc>
<@juliand:fehler-in-der-matrix.de> And what is the config after enabling the peripheral?
<re_irc>
<@rin_shima:cryptty.tk> : config...? It seems that only the open drain output mode requires config...
<re_irc>
<@juliand:fehler-in-der-matrix.de> The table description says that this is the configuration before enabling the peripheral. According to the 3rd paragraph this is when the system is OFF and shall not influence other devices on the bus.
<re_irc>
<@juliand:fehler-in-der-matrix.de> But I presume you want to turn the system ON and use it...
<re_irc>
<@rin_shima:cryptty.tk> oh...
<re_irc>
<@rin_shima:cryptty.tk> So, what should I do to properly initialize the I2C bus and access the peripheral on the specified pin? It appears to be a bit convoluted for me currently...
<re_irc>
<@rin_shima:cryptty.tk> : hmm, this example uses a lot of syntaxes that I can't fathom... like the "context" thing, can't find this usage elsewhere
<re_irc>
But thanks nevertheless
<re_irc>
<@juliand:fehler-in-der-matrix.de> The context stuff is specific to the used framework. But lines 46ff and 61 should be the same for you, as well.
<re_irc>
<@rin_shima:cryptty.tk> : btw from the pcb image provided in this link, it seems that there is already a pull up resistor built-in in the module... I don't understand now
<re_irc>
<@rin_shima:cryptty.tk> btw are there ways for me to manually debug/spectate output from i2c connections? If so, how?
<re_irc>
<@rin_shima:cryptty.tk> * connections, through serial or other means?
<re_irc>
<@joelsa:fehler-in-der-matrix.de> You can get one of these cheap Logic Analyzers for 10$
<re_irc>
<@henrik_alser:matrix.org> Btw, if you’re new to embedded Rust i’d very much recommend you to build your apps on top of rtic or embassy from the get go to not be confused by all the boilerplate of a ”bare bones” app. For anything more involved than a blinky you’ll run into the same problems as these frameworks solve in a super nice way
<re_irc>
<@henrik_alser:matrix.org> Then if you’re interested in How it works under the hood it’ll be easier to grasp one layer at a time
<re_irc>
<@henrik_alser:matrix.org> (Starting from the bottom up is way more confusing ime, introducing a lot of students to embedded Rust)
<re_irc>
<@henrik_alser:matrix.org> * Rust every year)
<re_irc>
<@henrik_alser:matrix.org> (Performance-wise you’ll be very hard pressed to make something as performant and reliable as these frameworks offer you on your own)
<re_irc>
<@henrik_alser:matrix.org> Just a side note :)
<re_irc>
<@henrik_alser:matrix.org> If you have questions about that demo, just ask, i believe i’m the one to blame from a couple years back :D
<re_irc>
<@d3zd3z:matrix.org> Any pointers to getting probe-run/probe-rs-cli working with the nRF5340. I get an error "An operation could not be performed because it lacked the permission to do so: erase_all". I did an "nrfjprog --recover", and using "nrfjprog --program ..." does seem to work.
<re_irc>
<@d3zd3z:matrix.org> It seems if I add "--verify" to the "nrfjprog" command, it comes back that the flash verification fails, so it might not actually be working with that tool either.
dc740 has joined #rust-embedded
<re_irc>
<@d3zd3z:matrix.org> So I got nrfjprog working, I just need to pass "--coprocessor CP_APPLICATION" as well, and it flashes and verifies. "probe-rs" (and "probe-run") still come up giving the permission error on erase.
<re_irc>
<@d3zd3z:matrix.org> So, I think the failures weren't related to each other.
<re_irc>
<@d3zd3z:matrix.org> There is an example for this board in Embassy, so I suspect this board has worked at some point.
<re_irc>
<@dirbaio:matrix.org> use "probe-rs-cli run --allow-erase-all"
<re_irc>
<@dirbaio:matrix.org> the reason it wants to erase every time is the debug port gets locked if the flashed firmware doesn't explicitly unlock it