Hi there,
I am trying to output XTAL32K on P0_14 to be able to connect it to external sensors. However, until now I was not successful in trying to do so. I have always set P0_14 to output mode and tried the following:
1. I have set P0_14 function to HW_GPIO_FUNC_CLOCK function and set GPIO_CLK_SEL_REG[FUNC_CLOCK_EN]
2. Alternatively, I have set GPIO_CLK_SEL_REG[FUNC_CLOCK_EN] while setting P0_14 function to HW_GPIO_FUNC_GPIO. At the same time I have set USBPAD_REG[USBPAD_EN] as instructed on p.294 of the datasheet (40.2.5 Special I/O Considerations)
I have also tried various combinations of the above approaches but could not get it to work.
Can you tell me what I am doing wrong?
上面的两种方法之间有什么区别?
On p.294 of the datasheet (40.2.5 Special I/O Considerations) it says, that P0_14 should not be used in sleep mode. Does this mean, that I cannot output XTAL32K in sleep mode?
谢谢你的帮助!
Hi Christian,
Let me check it and I will get back to you as soon as possible.
谢谢,PM_DIALOG.
Any news on this? By now I have found "5.4.3 Generating a Clock Output from DA1469x" in the DA1469x Application Hardware Design Guidelines which answers questions 2 and 3 from above. However, it is still not working. Here is how I configure things:
在system_init()中,我设置了sleep_mode pm_mode_idle to keep the processor in active state:
Afterwards I configure the pins following the two methods (both of which do not work for me).
Method 1:
Method 2:
Hi Christian,
My apologies for the delay. According to datasheet, P0_14 is used for the USB and specifically for Analog USB Full Speed D+ signal (USBp). Please check Table 2: DA14691/5 Pin Description from the datasheet. There are two options for exporting the XTAL32K to a GPIO.
Hardware modifications are needed in the DA1469x daughter board card. Suppose that you are using the DA14695 daughter board VFBGA86. Schematics can be found in the link below:
https://www.dialog-seminile.com/sites/default/files/da14695-db-vfbga86_vd-sch.pdf.
默认情况下,R7(0 OHM)和R8(0欧姆)电阻未填充。如果将XTAL32K导出到P0_14,则应填充两个电阻,但您不再具有USB功能。在HW修改后,请执行以下SW修改。出于演示目的,您应该在SDK的FreertOS_Retarget项目中修改prvsetuphardware(),如下:
The are two different ways to set the registers. The code snippet is working with AUTOMATIC_CLOCK_OUTPUT set to 0 as well.
The default sleep mode is extended sleep mode, so you will see the XTAL32K exported to P0_14 for around 8sec. After 8sec the device will go to extended sleep and the configurations will be lost. If you would like to have the XTAL32K exported to P0_14 continuedly, disable the extended sleep mode(pm_mode_extended_sleep) to active mode(pm_mode_active).
In this case, you should not need to do any hardware modifications. Just use the following code snippets in freertos_retarget project.
谢谢,PM_DIALOG.