- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm new to psoc 6. Somewhere in the PSoC 6 Peripheral Driver Library Documentation I read that peripherals need to be initialized. I'm wondering what do the settings in the device configurator (DC) actually do. If I setup a TCPWM (single shot) in DC, I still need to use Cy_TCPWM_Counter_Init() to initialize it, don't I? Does DC creates the configuration structure that I need to use in the function? Where can I find the name of the structure (if created by DC)? if not, what does DC actually do?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Rodo ,
In Device configurator you actually configure the block that you are using. Say you are using PWM, then when you open PWM’s configurator you will configure parameters like PWM Mode, PWM Resolution, Run Mode, PWM Alignment, Compare, Period etc. and select PWM output line, PWM_n output line etc.
After specifying all these parameters while writing the code, you call functions like Cy_TCPWM_PWM_Init(). This function call will initialize the PWM with the parameters that you have specified in the device configurator and the register values will be changed accordingly.
After you call Init() function, All the data will be stored in cy_stc_tcpwm_pwm_config_t Struct. It has various data fields like pwmMode, pwmAlignment, runMode, clockPrescalar etc. Please find more information about cy_stc_tcpwm_pwm_config_t Struct at https://infineon.github.io/psoc6pdl/pdl_api_reference_manual/html/structcy__stc__tcpwm__pwm__config_...
For more information, you can refer to https://infineon.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__tcpwm.html
Kind regards
Arpit Srivastav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Rodo ,
In Device configurator you actually configure the block that you are using. Say you are using PWM, then when you open PWM’s configurator you will configure parameters like PWM Mode, PWM Resolution, Run Mode, PWM Alignment, Compare, Period etc. and select PWM output line, PWM_n output line etc.
After specifying all these parameters while writing the code, you call functions like Cy_TCPWM_PWM_Init(). This function call will initialize the PWM with the parameters that you have specified in the device configurator and the register values will be changed accordingly.
After you call Init() function, All the data will be stored in cy_stc_tcpwm_pwm_config_t Struct. It has various data fields like pwmMode, pwmAlignment, runMode, clockPrescalar etc. Please find more information about cy_stc_tcpwm_pwm_config_t Struct at https://infineon.github.io/psoc6pdl/pdl_api_reference_manual/html/structcy__stc__tcpwm__pwm__config_...
For more information, you can refer to https://infineon.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__tcpwm.html
Kind regards
Arpit Srivastav