CYBT-343026 ACLK output

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
NiPa_3775556
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

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
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

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
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

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?

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