embassy icon indicating copy to clipboard operation
embassy copied to clipboard

Any work towards ADC support in F3 series?

Open kacper-cholewinski opened this issue 3 years ago • 10 comments
trafficstars

kacper-cholewinski avatar Jul 06 '22 18:07 kacper-cholewinski

same as #840

No one is working on it AFAIK.

First step would be to add it to stm32-data. If you're lucky it'll be the same version (adc_vX) as another supported family, so you can just reuse it. If not, youll have to also write a new driver for it in embassy-stm32.

Dirbaio avatar Jul 06 '22 22:07 Dirbaio

Can you give me more instructions? Because I think I don't fully understand how to achieve this.

kacper-cholewinski avatar Jul 09 '22 20:07 kacper-cholewinski

embassy-stm32 gets all the info about chips from stm32-data (registers, addresses, pins, etc).

The issue is stm32-data is missing the registers for F3 ADC. See here there's no registers field, compare with F4.

To fix it, follow the steps here to generate a YAML for the F3 ADC registers. Diff it with the existing YAMLs in data/registers to check whether it's compatible with one of the existing YAMLs or not.

If it is, you're lucky. Add an entry for it in perimap, then regenerate. This will make the chip file get a registers field, which will enable one of these cfgs which will pull in the driver for the right version.

If not, you'll need to add a new version to data/registers following these steps, and a new driver in embassy-stm32 for it.

Dirbaio avatar Jul 09 '22 20:07 Dirbaio

Ok, thanks for help. I'm trying but I have some problems with "d" script. Is it supposed to work on win10, or UNIX only? WindowsTerminal_zyX7IbUA46

kacper-cholewinski avatar Jul 11 '22 15:07 kacper-cholewinski

unix only, in Windows you can probably use WSL.

Dirbaio avatar Jul 11 '22 15:07 Dirbaio

Ok, so I've done it on Ubuntu virtual machine, and I got some YAMLs, and a lot of fails. I've tried LPUART and LPUART1. What next? EDIT: i've tried ADC and ADC1 too, and i got some YAMLs more, but idk whether it is what i was supposed to do vmplayer_OgqdaQru1B vmplayer_p7GSNKgKgS vmplayer_zSljoOLoSz

kacper-cholewinski avatar Jul 11 '22 18:07 kacper-cholewinski

The steps are in my previous post and in the stm32-data README.

Dirbaio avatar Jul 11 '22 18:07 Dirbaio

Ok, it seems I don't have necessary knowledge to carry out this process. Thx for help anyway.

kacper-cholewinski avatar Jul 11 '22 18:07 kacper-cholewinski

let's keep the issue open even if you're not planning on working on it yourself, it's a missing feature after all.

Dirbaio avatar Jul 11 '22 18:07 Dirbaio