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

Add IOConfig struct and pub fn io_config() #3272

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

beastbytes
Copy link

The STM32 TSC needs to do successive acquisitions when using multiple channels in a group. To do this the IOs must be configured for each acquisition. This change reflects the implementations in the STM32 HAL.

See:

Specifically, see the HAL solution provided. It shows that only one acquisition channel must enabled in a group during an acquisition cycle, then the next channel in the next acquisition cycle, and so on.

While this is about the STM Touch Library, table 8 (and others) show the acquisition timings required for multiple channels in a group.

The STM32 TSC needs to do successive acquisitions when using multiple channels in a group. To do this the IOs must be configured for each acquisition. This change reflects the implementations in the STM32 HAL.

See:
* https://community.st.com/t5/stm32-mcus-products/tsc-channel-selection/td-p/164783

Specifically, see the HAL solution provided. It shows that only one acquisition channel must enabled in a group during an acquisition cycle, then the next channel in the next acquisition cycle, and so on.


* https://www.st.com/content/ccc/resource/technical/document/user_manual/group0/d6/4c/20/0d/a1/c1/4c/99/DM00210526/files/DM00210526.pdf/jcr:content/translations/en.DM00210526.pdf

While this is about the STM Touch Library, table 8 (and others) show the acquisition timings required for multiple channels in a group.
@michelrandahl
Copy link
Contributor

as someone currently learning STM32 TSC this looks good to me, although I am not sure if we need to write other masks than ioccr -if we have already set the other masks (sample, hysterisis, etc) during configuration. I have almost no experience with C so its hard for me to say if they write all these masks each time before an acquisition in the C HAL.

I am also working on something similar #3274, and didn't see this PR before creating my draft. However, I would not object to getting some small PR like this one merged before mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants