cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Bluetooth

New Contributor

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

0 Likes
Reply
1 Solution
Moderator
Moderator

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?

View solution in original post

2 Replies
Moderator
Moderator

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?

View solution in original post

New Contributor

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.

0 Likes
Reply