profile
viewpoint

stm32-rs/stm32f4xx-hal 139

A Rust embedded-hal HAL for all MCUs in the STM32 F4 family

aurelj/libserialport 1

My personal work on libserialport

aurelj/sigrok-dumps 1

My personal work on sigrok-dumps

aurelj/blue-pill-quickstart 0

Quickstart a Rust project for the blue pill board

aurelj/cmsis-pack-manager 0

A Python module for handling CMSIS Pack files

aurelj/embedded-graphics 0

A no_std graphics library for embedded applications

aurelj/float-cmp 0

Floating point approximate comparison for Rust

aurelj/gnome-shell-extension-workspaceNavigator 0

Allow selection of workspaces with up and down arrow keys in overlay mode.

aurelj/libsigrok 0

My personal work on libsigrok

aurelj/libsigrokdecode 0

My personal work on libsigrokdecode

PR opened stm32-rs/stm32f4xx-hal

Port MonoTimer from stm32f1xx-hal

This is a straight-up copy of the MonoTimer from the stm32f1xx-hal crate:

https://github.com/stm32-rs/stm32f1xx-hal/blob/d976ba2312fae2f1b15707573bc5d82ea00ba73f/src/time.rs#L229-L278

I wanted the same functionality in a stm32f4-based project. I tested it on an stm32f411CE WeAct USB C board, and it seems to behave properly.

+52 -1

0 comment

1 changed file

pr created time in 3 days

issue commentstm32-rs/stm32f4xx-hal

Complementary PWM outputs with dead time

It would be great to see it in HAL.

Yes, let's keep this open to track that.

kirill-havryliuk

comment created time in 8 days

issue commentstm32-rs/stm32f4xx-hal

Complementary PWM outputs with dead time

Thank you for you answer, @thalesfragoso. Provided example actually works. I haven't tested it good enough, but oscilloscope shows what I expect.

"Complementary PWM outs + DT" is very essential feature, if you plan to drive bridge, for examples. It would be great to see it in HAL. But, anyway, thx, guys for your work!

kirill-havryliuk

comment created time in 8 days

PR opened stm32-rs/stm32f4xx-hal

DMA: Fix problems with DMASet and timer wrappers

The initial idea of the DMASet trait was that people could unsafely implement it themselves from outside of the HAL. Unfortunately, we missed the problem with the fact that tuples are considered a foreign type. This PR drops the tuple approach but still maintains the check that DMASet provides.

I also added a fix for #227. Fixes #227

This is also a possible solution to #226, but it takes a different approach, it still forces people (or the HAL) to make a new type if they want a "non-default" memory size (or address). This is more verbose than just dropping the associated type of PeriAddress in favor of a generic parameter, but, IMO, the verbosity can be an advantage here.

Marking as a draft because I still want to make sure this works as intended and that there isn't another corner case, I also would like the opinion of @albru123

+6 -7

0 comment

2 changed files

pr created time in 10 days

issue commentstm32-rs/stm32f4xx-hal

Complementary PWM outputs with dead time

Unfortunately, there isn't support for this on the HAL itself (yet).

About your example, you will need to check the manual and the HAL code to be sure your new configuration will play nice with our internal one.

kirill-havryliuk

comment created time in 10 days

issue commentstm32-rs/stm32f4xx-hal

Complementary PWM outputs with dead time

I, probably, can do it like:

    // TIM1_CH1  PE9
    // TIM1_CH1N PE8

    // TIM1_CH2  PE11
    // TIM1_CH2N PE10

    // TIM1_CH3  PE13
    // TIM1_CH3N PE12

    // Set complementary oututs mode as AF1
    gpioe.pe8 .into_alternate_af1();
    gpioe.pe10.into_alternate_af1();
    gpioe.pe12.into_alternate_af1();

    let channels = 
        ( gpioe.pe9 .into_alternate_af1()
        , gpioe.pe11.into_alternate_af1()
        , gpioe.pe13.into_alternate_af1()
        );

    let 
        ( mut ch1
        , mut ch2
        , mut ch3
        ) = pwm::tim1(device.TIM1, channels, clocks, 30000_u32.hz());

    unsafe {
        let tim1_regb = &(*(stm32::TIM1::ptr()));

        // Enable complementary outputs
        tim1_regb.ccer.modify(|_, w| w.cc1ne().set_bit());
        tim1_regb.ccer.modify(|_, w| w.cc2ne().set_bit());
        tim1_regb.ccer.modify(|_, w| w.cc3ne().set_bit());

        // Set dead time
        tim1_regb.bdtr.modify(|_, w| w.dtg().bits(10));

        // Center aligned
        tim1_regb.cr1.modify(|_, w| w.cms().center_aligned1());
    }

    let ch1_max_duty = ch1.get_max_duty();
    let ch2_max_duty = ch2.get_max_duty();
    let ch3_max_duty = ch3.get_max_duty();

    ch1.set_duty(ch1_max_duty / 2);
    ch2.set_duty(ch1_max_duty / 4);
    ch3.set_duty(ch1_max_duty / 8);

    ch1.enable();
    ch2.enable();
    ch3.enable();

I am very new to rust, so, maybe there exist better way to achieve that... Would appreciate any suggestions.

kirill-havryliuk

comment created time in 10 days

issue openedstm32-rs/stm32f4xx-hal

Complementary PWM channels with dead time

Hi, is it possible, to configure complementary PWM channels with dead time using stm32f4xx_hal?

created time in 10 days

issue openedstm32-rs/stm32f4xx-hal

CountDown lasting over one second?

I'm writing an embedded-hal driver for interfacing with Espressif ESP-AT firmware over UART. ESP-AT in some circumstances will cease responding to commands, so I need a timeout in my driver to know when something has gone wrong. But ESP-AT deals with wifi and HTTP, so some commands can take over one second to send any response. The timers in this HAL only support 1Hz at the slowest. Is this a HAL or hardware limitation?

created time in 12 days

pull request commentstm32-rs/stm32f4xx-hal

Add change log check

See also: https://github.com/probe-rs/probe-rs/pull/428#issuecomment-731154770

Disasm

comment created time in 12 days

PullRequestEvent

PR closed stm32-rs/stm32f4xx-hal

Add change log check
+19 -0

5 comments

1 changed file

Disasm

pr closed time in 12 days

pull request commentstm32-rs/stm32f4xx-hal

Add change log check

Closing the PR as this problem requires a different solution.

Disasm

comment created time in 12 days

pull request commentstm32-rs/stm32f4xx-hal

Add change log check

Probably this will not work at all, if it fails to work for PRs originated from forks (like it usually happens). Sigh.

Disasm

comment created time in 12 days

pull request commentstm32-rs/stm32f4xx-hal

Add change log check

@therealprof https://github.com/actions/first-interaction/issues/10#issuecomment-545576314 Could you try making such PR by yourself?

Disasm

comment created time in 12 days

pull request commentstm32-rs/stm32f4xx-hal

Add change log check

Well, this changelog check apparently failed to check:

(node:2468) UnhandledPromiseRejectionWarning: HttpError: Resource not accessible by integration
    at /home/runner/work/_actions/Zomzog/changelog-checker/v1.1.0/dist/index.js:7752:23
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:2468) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2468) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Disasm

comment created time in 12 days

pull request commentstm32-rs/stm32f4xx-hal

Add change log check

/* Missing change log entry is intended at the moment :) */

Disasm

comment created time in 12 days

PR opened stm32-rs/stm32f4xx-hal

Add change log check
+14 -0

0 comment

1 changed file

pr created time in 12 days

PR merged stm32-rs/stm32f4xx-hal

Add syscfg driver to enforce clock enable

This should prevent terrible user experience when SYSCFG is used without its clock enabled.

Note that this is a breaking change.

+54 -11

4 comments

7 changed files

Disasm

pr closed time in 12 days

push eventstm32-rs/stm32f4xx-hal

Vadim Kaushan

commit sha af9e9f0e3b30259751a23ddc4eb1bb968bae6168

Add syscfg driver to enforce clock enable

view details

Vadim Kaushan

commit sha a64ce7645515620b2457e4bdaf3402aa36dac765

Update examples

view details

Vadim Kaushan

commit sha 2f4a48e5b06e7fb8daaaf57f07a7c5ffb1250ebc

Re-export gpio::ExtiPin in prelude, update examples

view details

Vadim Kaushan

commit sha 18b55eb72750295061fc0834ce4cb82182ddf29e

rustfmt

view details

Vadim Kaushan

commit sha 16dc41f351dd87073dce410d01f0615202b0a465

Add change log entry

view details

bors[bot]

commit sha 4b04112d37bc14ed752d1c4cd6591950d9d26b2a

Merge #232 232: Add syscfg driver to enforce clock enable r=therealprof a=Disasm This should prevent terrible user experience when SYSCFG is used without its clock enabled. Note that this is a breaking change. Co-authored-by: Vadim Kaushan <admin@disasm.info>

view details

push time in 12 days

pull request commentstm32-rs/stm32f4xx-hal

Add syscfg driver to enforce clock enable

https://github.com/probe-rs/probe-rs/pull/428/files However, it uses secrets.GITHUB_TOKEN, I'm not sure why. Probably needs additional setup.

Disasm

comment created time in 12 days

push eventstm32-rs/stm32f4xx-hal

Vadim Kaushan

commit sha af9e9f0e3b30259751a23ddc4eb1bb968bae6168

Add syscfg driver to enforce clock enable

view details

Vadim Kaushan

commit sha a64ce7645515620b2457e4bdaf3402aa36dac765

Update examples

view details

Vadim Kaushan

commit sha 2f4a48e5b06e7fb8daaaf57f07a7c5ffb1250ebc

Re-export gpio::ExtiPin in prelude, update examples

view details

Vadim Kaushan

commit sha 18b55eb72750295061fc0834ce4cb82182ddf29e

rustfmt

view details

Vadim Kaushan

commit sha 16dc41f351dd87073dce410d01f0615202b0a465

Add change log entry

view details

bors[bot]

commit sha 4b04112d37bc14ed752d1c4cd6591950d9d26b2a

Merge #232 232: Add syscfg driver to enforce clock enable r=therealprof a=Disasm This should prevent terrible user experience when SYSCFG is used without its clock enabled. Note that this is a breaking change. Co-authored-by: Vadim Kaushan <admin@disasm.info>

view details

push time in 12 days

delete branch stm32-rs/stm32f4xx-hal

delete branch : staging.tmp

delete time in 12 days

push eventstm32-rs/stm32f4xx-hal

Vadim Kaushan

commit sha af9e9f0e3b30259751a23ddc4eb1bb968bae6168

Add syscfg driver to enforce clock enable

view details

Vadim Kaushan

commit sha a64ce7645515620b2457e4bdaf3402aa36dac765

Update examples

view details

Vadim Kaushan

commit sha 2f4a48e5b06e7fb8daaaf57f07a7c5ffb1250ebc

Re-export gpio::ExtiPin in prelude, update examples

view details

Vadim Kaushan

commit sha 18b55eb72750295061fc0834ce4cb82182ddf29e

rustfmt

view details

Vadim Kaushan

commit sha 16dc41f351dd87073dce410d01f0615202b0a465

Add change log entry

view details

bors[bot]

commit sha d469ee6b64b16d421936aee655215f52de924c6f

[ci skip][skip ci][skip netlify] -bors-staging-tmp-232

view details

push time in 12 days

create barnchstm32-rs/stm32f4xx-hal

branch : staging.tmp

created branch time in 12 days

pull request commentstm32-rs/stm32f4xx-hal

Add syscfg driver to enforce clock enable

@therealprof fixed :) I should probably pull a changelog requirement CI rule from probe-rs.

Such a thing exists? That'd be a great addition to all WG repos...

Disasm

comment created time in 12 days

pull request commentstm32-rs/stm32f4xx-hal

Add syscfg driver to enforce clock enable

@therealprof fixed :) I should probably pull a changelog requirement CI rule from probe-rs.

Disasm

comment created time in 12 days

PR opened stm32-rs/stm32f4xx-hal

Add syscfg driver to enforce clock enable

This should prevent terrible user experience when SYSCFG is used without its clock enabled.

+52 -11

0 comment

6 changed files

pr created time in 12 days

more