olback / h7

GNU Affero General Public License v3.0
1 stars 0 forks source link

Watchdog #13

Open olback opened 1 year ago

bsodmike commented 8 months ago

Hi @olback I'm fairly new to stm32hal and still learning as I go on.

  1. Can you explain the need for DWT/DCB etc here https://github.com/olback/h7/blob/rust/h7-cm7/src/main.rs#L50-L54
  2. I'm using a Jlink-mini for running my debugger in SWD. Do I need to enable feature = "semihosting" to see log output? I tried this and still don't see any log output in any obvious place (mind you I'm using VSCode for debugging).

Where do I see the output for say log::info!("Framebuffer: {:p}", framebuffer as *const ()); -- is this shown in the GDB server log or...?

  1. I tried to get usb_hs working on the Arduino GIGA R1 WiFI https://github.com/stm32-rs/stm32h7xx-hal/blob/master/examples/usb_serial.rs#L62-L66 but find it takes a "long time" for the USB device to appear. Also if I do something like this:
    loop {
        led.set_high();
        delay.delay_ms(100_u16);

        led.set_low();
        delay.delay_ms(100_u16);

        if !usb_dev.poll(&mut [&mut serial]) {
            continue;
        }

        serial.write(b"Hello, human...!").unwrap();

The main loop halts (I haven't been able to dig into this yet). Thanks.