In this use case, the TSENS will be configured with the following settings:
- GCLK generator 0 (GCLK main) clock source
- Free running disabled
- Run in standby
- Window monitor disabled
- All events (input and generation) disabled
- Calibration value which read from NVM or user set
Setup
Prerequisites
There are no special setup requirements for this use-case.
Copy-paste the following setup code to your user application:
Add to user application initialization (typically the start of main()
):
Workflow
- Configure the TSENS module.
- Create a TSENS module configuration struct, which can be filled out to adjust the configuration of a physical TSENS peripheral.
- Initialize the TSENS configuration struct with the module's default values.
- Note
- This should always be performed before using the configuration struct to ensure that all values are initialized to known default settings.
- Set TSENS configurations.
- Enable the TSENS module so that conversions can be made.
Use Case
Code
Copy-paste the following code to your user application:
Workflow
- Start conversion.
- Wait until conversion is done and read result.
- Enter an infinite loop once the conversion is complete.