SYD881X uses code to modify 32.768Khz clock source

SYD881X uses the code to modify the 32.768Khz clock source
. The customer encountered a problem: the clock source of the 4K configuration is the internal 32.768ROSC clock source when it is shipped, but the code uses an external 32.768Khz crystal oscillator as the clock source. At this time, it can be upgraded to 4K. But upgrading 4K is troublesome, so here is a function that can modify the clock source configuration in 4K in the code clock. At the beginning,
modify the 4K configuration and change the clock source to ROSC:
insert image description here

Comment out the ROSC macro in the code:
insert image description here

Make the following changes in MAIN:
insert image description here

When the code runs for the first time, the output is printed as follows. Note: after a while, the device will be reset and RTT will be disconnected.
insert image description here
insert image description here

After disconnecting, the chip resets and runs again. At this time, use RTT connection again to see that the clock source is the modified external 32.768Khz clock source and the code runs normally:
insert image description here

The function here has been realized!
The API mentioned in this article must exist in the protocol stack of syd8811_ble_lib20230516_103118.lib or a newer version.
Please download the code from the following address: https://download.csdn.net/download/chengdong1314/87788776

Guess you like

Origin blog.csdn.net/chengdong1314/article/details/130701575