- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to configure one of the ACLK pins to provide a clock to an external device. I've tried adding the following lines but it does not appear to have any affect:
wiced_hal_gpio_configure_pin(WICED_P36, GPIO_OUTPUT_ENABLE, 0);
wiced_hal_aclk_enable(24000000, ACLK0, ACLK_FREQ_24_MHZ);
I could not find anything that explicitly tells the GPIO driver what function I want on the pin, how does it know I want ACLK0 on P36 (rather than P32).
Similar to this question but a different device: CYW20735 ACLK on pin
Thanks
Nigel
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
wiced_hal_gpio_configure_pin sets as GPIO, and will not enable ACLK to be exposed.
There is no direct way to route the ACLK to GPIO pin in 20706
Is it ok to use PWM for your application?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
wiced_hal_gpio_configure_pin sets as GPIO, and will not enable ACLK to be exposed.
There is no direct way to route the ACLK to GPIO pin in 20706
Is it ok to use PWM for your application?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks it might be.
I can get 12MHz out of the PWM using this code (comes out the BT_GPIO_6/P11/P26/SPI1_CS_N line):
#define PWM_CHANNEL PWM0
#define PWM_INP_CLK_IN_HZ (24*1000*1000)
pwm_config_t pwm_config;
wiced_hal_gpio_configure_pin(WICED_P26, GPIO_OUTPUT_ENABLE, 0);
wiced_hal_aclk_enable(PWM_INP_CLK_IN_HZ, ACLK1, ACLK_FREQ_24_MHZ);
wiced_hal_pwm_start(PWM_CHANNEL, PMU_CLK, 0x3fe, 0x3fe, 0);
I'll let the hardware guy know if this is good enough for what they need.