Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/efm32: fix DAC configuration #19886

Merged
merged 4 commits into from
Aug 23, 2023

Conversation

gschorcht
Copy link
Contributor

@gschorcht gschorcht commented Aug 15, 2023

Contribution description

The EFM32 MCU allows the reference voltage to be configured per DAC device, not per DAC channel. Also, the DAC reference voltage was defined in the configuration but not used anywhere.

At the moment we have only defined one board (stwstk6220a) that uses the DAC, so changing the configuration interface shouldn't be critical.

Testing procedure

tests/periph/dac should still work for the stwstk6220a

BOARD=slwstk6220a make -j8 -C tests/periph/dac flash

I don't have a stwstk6220a board (EFM32 Series 0) so that I can't test it. I could only test it for the sltb009a board (EFM32 Series 1) with the change for VDAC in PR #19887.

Issues/PRs references

The EFM32 MCU allows the reference voltage to be configured per DAC device, not per DAC channel. Also, the DAC reference voltage was defined in the configuration but not used anywhere.
@gschorcht gschorcht requested a review from basilfx as a code owner August 15, 2023 12:09
@github-actions github-actions bot added Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports labels Aug 15, 2023
@gschorcht gschorcht added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Aug 15, 2023
@riot-ci
Copy link

riot-ci commented Aug 15, 2023

Murdock results

✔️ PASSED

76bbae9 boards/stk3700: fix DAC configuration

Success Failures Total Runtime
7939 0 7939 14m:22s

Artifacts

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like .ref wasn't even used before

@benpicco
Copy link
Contributor

bors merge

bors bot added a commit that referenced this pull request Aug 21, 2023
19387: drivers/atwinc15x0: support dynamic scanning and connection to AP r=benpicco a=fabian18



19874: coap: add missing option numbers r=benpicco a=JKRhb



19875: coap: add missing Content-Format definitions r=benpicco a=JKRhb



19876: sys/net/ipv4/addr: fix typos r=benpicco a=Enoch247

### Contribution description

This patch fixes some typos in the doxygen doc.

### Testing procedure

Nothing to test. No change to code.

### Issues/PRs references

- None known


19878: makefiles/usb_board_reset.mk: declare term-delay target with test target r=benpicco a=aabadie



19886: cpu/efm32: fix DAC configuration r=benpicco a=gschorcht

### Contribution description

The EFM32 MCU allows the reference voltage to be configured per DAC device, not per DAC channel. Also, the DAC reference voltage was defined in the configuration but not used anywhere.

At the moment we have only defined one board (`stwstk6220a`) that uses the DAC, so changing the configuration interface shouldn't be critical.

### Testing procedure

`tests/periph/dac` should still work for the `stwstk6220a`
```
BOARD=slwstk6220a make -j8 -C tests/periph/dac flash
```
I don't have a `stwstk6220a` board (EFM32 Series 0) so that I can't test it. I could only test it for the `sltb009a` board (EFM32 Series 1) with the change for VDAC in PR #19887.

### Issues/PRs references


19888: boards/sltb009a: complete and fix documentation r=benpicco a=gschorcht

### Contribution description

This PR completes and fixes the documentation which was still in the state as generated automatically by `efm2riot`.

The PR also includes a fix of the configuration of the second UART device that was find out while completing the documentation.

### Testing procedure

Green CI

### Issues/PRs references


Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.loc@MLPA-NB119.(none)>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
Co-authored-by: Jan Romann <jan.romann@hs-emden-leer.de>
Co-authored-by: Joshua DeWeese <jdeweese@primecontrols.com>
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
@bors
Copy link
Contributor

bors bot commented Aug 21, 2023

Build failed (retrying...):

@benpicco
Copy link
Contributor

bors cancel

@bors
Copy link
Contributor

bors bot commented Aug 21, 2023

Canceled.

@benpicco
Copy link
Contributor

looks like stk3700 also needs an update

@gschorcht
Copy link
Contributor Author

looks like stk3700 also needs an update

Fixed, stk3600 and stk3700 also had a DAC configuration. It should work now.

@benpicco
Copy link
Contributor

bors merge

bors bot added a commit that referenced this pull request Aug 23, 2023
19886: cpu/efm32: fix DAC configuration r=benpicco a=gschorcht

### Contribution description

The EFM32 MCU allows the reference voltage to be configured per DAC device, not per DAC channel. Also, the DAC reference voltage was defined in the configuration but not used anywhere.

At the moment we have only defined one board (`stwstk6220a`) that uses the DAC, so changing the configuration interface shouldn't be critical.

### Testing procedure

`tests/periph/dac` should still work for the `stwstk6220a`
```
BOARD=slwstk6220a make -j8 -C tests/periph/dac flash
```
I don't have a `stwstk6220a` board (EFM32 Series 0) so that I can't test it. I could only test it for the `sltb009a` board (EFM32 Series 1) with the change for VDAC in PR #19887.

### Issues/PRs references


19892: pkg/tinydtls: allow to set buffer size from application again r=benpicco a=leandrolanzieri

### Contribution description

Currently the buffer size on tinydtls is set in its Makefile whenever `gcoap` module is present. This limits the ability of the user to override the value. This adds a pre-check of the `CFLAGS` to see if it was set before.

### Testing procedure

Try setting `CFLAGS += -DDTLS_MAX_BUF=<some_value>` on `examples/gcoap_dtls`, you should be able to override the default value without errors.


### Issues/PRs references
Reported in #19838


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
@bors
Copy link
Contributor

bors bot commented Aug 23, 2023

Build failed (retrying...):

bors bot added a commit that referenced this pull request Aug 23, 2023
19886: cpu/efm32: fix DAC configuration r=benpicco a=gschorcht

### Contribution description

The EFM32 MCU allows the reference voltage to be configured per DAC device, not per DAC channel. Also, the DAC reference voltage was defined in the configuration but not used anywhere.

At the moment we have only defined one board (`stwstk6220a`) that uses the DAC, so changing the configuration interface shouldn't be critical.

### Testing procedure

`tests/periph/dac` should still work for the `stwstk6220a`
```
BOARD=slwstk6220a make -j8 -C tests/periph/dac flash
```
I don't have a `stwstk6220a` board (EFM32 Series 0) so that I can't test it. I could only test it for the `sltb009a` board (EFM32 Series 1) with the change for VDAC in PR #19887.

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
@gschorcht
Copy link
Contributor Author

Hm, in C++ the order of struct members in static initializers matters 😟

../../boards/stk3700/include/periph_conf.h:90:1: error: designator order for field 'dac_conf_t::ref' does not match declaration order in 'const dac_conf_t'
   90 | };
      | ^

I changed the order for all boards and squashed it directly.

@gschorcht gschorcht force-pushed the cpu/efm32_fix_dac_config branch from 559381c to 76bbae9 Compare August 23, 2023 10:14
@bors
Copy link
Contributor

bors bot commented Aug 23, 2023

Canceled.

@gschorcht
Copy link
Contributor Author

gschorcht commented Aug 23, 2023

It is really annoying that CI compilations fail 90% of the cases because of the tests/net/gcoap_server.

@gschorcht gschorcht added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Aug 23, 2023
@benpicco
Copy link
Contributor

bors merge

@bors
Copy link
Contributor

bors bot commented Aug 23, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 2a4496b into RIOT-OS:master Aug 23, 2023
@gschorcht
Copy link
Contributor Author

Thanks.

@gschorcht gschorcht deleted the cpu/efm32_fix_dac_config branch August 23, 2023 21:20
bors bot added a commit that referenced this pull request Aug 28, 2023
19887: cpu/efm32/periph: add DAC support for EFM32 Series 1 (VDAC) r=aabadie a=gschorcht

### Contribution description

This PR provides a small change for `periph_dac` to support the VDACs of EFM32 Series 1 MCUs. It was tested with `sltb009a` board for which this PR includes the DAC configuration.

### Testing procedure

`tests/periph/dac` should work for the `sltb009a` board. I've tested it already.
```
BOARD=sltb009a make -j8 -C tests/periph/dac flash
```

### Issues/PRs references

Depends on PR #19886 

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
bors bot added a commit that referenced this pull request Aug 30, 2023
19887: cpu/efm32/periph: add DAC support for EFM32 Series 1 (VDAC) r=aabadie a=gschorcht

### Contribution description

This PR provides a small change for `periph_dac` to support the VDACs of EFM32 Series 1 MCUs. It was tested with `sltb009a` board for which this PR includes the DAC configuration.

### Testing procedure

`tests/periph/dac` should work for the `sltb009a` board. I've tested it already.
```
BOARD=sltb009a make -j8 -C tests/periph/dac flash
```

### Issues/PRs references

Depends on PR #19886 

19898: tests/net/gcoap_fileserver: disable test on CI r=aabadie a=benpicco




Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
@MrKevinWeiss MrKevinWeiss added this to the Release 2023.10 milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants