⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
21 posts / 0 new
Last post
bobspam@free.fr
Offline
Last seen:1 month 4 weeks ago
乔ined:2018-06-20 08:07
DA14683 - 16MHz Clock does not start

Hello

我am developing a hardware board using DA14683 and I just received a first prototype from production.
我managed to start a binary file using SEGGER j-link EDU up to the Cortex-M based on free_rtos retarget sample code.
The boot sequence is executed properly until :

sys_clock_mgr.c:397
while (!hw_cpm_is_xtal16m_started()) { // Block until XTAL16M starts

我designed my hardware board using
我QD 064296
- 16MHz
- ESR 70 Ohms
- Load Capacitance 8pF (2pF less than recommended values, but still in the range of 4-10pF)
- Frequency Tolerance 20ppm
- Frequency Stability 20ppm
- Drive Level 100µW
The Quartz has been soldered as close a possible to the CPU using symmetric 4.1mm length wiring.

Can you give me some procedure to debug step by step the 16MHz clock so I can figure out if default settings of the SDK are appropriate for me ?

Thank you in advance

Keywords:
Device:
PM_Dialog
Offline
Last seen:22 hours 4 min ago
Staff
乔ined:2018-02-08 11:03
Hi bobspam@free.fr,

Hibobspam@free.fr,

Can you please try to use an external crystal oscillator in order to make sure that the XTAL that you are using is working correctly? Also, I would suggest you to use the default trim values and check if the boot sequence starts correctly. Can you please let me know if you have done any modifications in the SDK?

Thanks, PM_Dialog

bobspam@free.fr
Offline
Last seen:1 month 4 weeks ago
乔ined:2018-06-20 08:07
Hello

Hello

Thank you for your first answer.

我am trying to run the freertos_retarget unmodified. It is not so much dependant to external hardware so it should allow me to validate minimal behavior of the DA14683 I am using. My hardware design is very basic with two exceptions : all external IO are 3.3V (flash and peripherals).

VBAT is measured by the JTAG probe at 3.7V during the tests.

我can not use external clock. It is not wired on my PCB. I tried to touch pads of the oscillator using a scope but internal capacitance of the probe is of the same order of magnitude than the quartz itself so I am pretty sure that it should produce erratic results.

我did not yet started to change trim values. Considering that the oscillator I am using is 2pF below the recommended 10pF, the trimming function should be very useful to get something stable and accurate.

  • 我tried Eclipse env under Windows using latest SDK for DA14683 without modification
    • JTAG env need to be reconfigured so my hardware is recognized. In particular hardware reset are sent very often and the DA1468x cut link to the JTAG.
    • by first using J-Link commander. I manage to start properly the j-link env and thus maintain gdb server opened.
    • After that I am able to run the app step by step and end-up in hw_watchdog_handle_int before system is blocked in the infinite loop of hw_cpm_is_xtal16m_started
  • 我also tried compiled app under linux using a newer version of GCC debugged using Segger Ozone
    • 整体的行为更简单out eclipse in the equation.
    • 我did not set the 0xdeadbeef at the beginning of the stack but ozone manage to catch breakpoints at the beginning of startup assembly code.
    • code execute until it waits for hw_cpm_is_xtal16m_started
    • in this conf, I tried to avoid the verification of XTAL16M that never ends in system init but then the freertos does not start its scheduler and breakpoints in tasks are not reached meaning that the system is not started properly.
  • 我checked my 32K cristal. It is unfortunately out of spec, Load capacitance is 12.5pF while accepted range is 6-9pF.
    • 我tried to use LP_CLK_RCX config but the result is the same.
  • 我finally modified SDK to use 32k RC and 16M RC for my prototype by removing all calibration related features.
    • 我reached the freertos tasks in this way but troubles continues with peripherals init.

Can you please confirm to me
- workaround so I use only RC clocks
- hardware design requirements for both clocks so I prepare my Run 2 ?

Thank you

PM_Dialog
Offline
Last seen:22 hours 4 min ago
Staff
乔ined:2018-02-08 11:03
Hi bobspam@free.fr,

Hibobspam@free.fr,

我f I understood correctly, you mentioned that you are using out of specs crystal oscillators. Could you please let me know which crystal oscillators are you using? The post possible reason for your issue is due to the XTALs. In order to use the RC16, you should change the sysclk_XTAL16M input of cm_sys_clk_init() and cm_sys_clk_set() in system_init() function with sysclk_RC16. Although, the code gets stack before the main() functions, so using the RC16 I suppose that will not fix your issue. By the way you could check it and let me know.

Thanks, PM_Dialog

bobspam@free.fr
Offline
Last seen:1 month 4 weeks ago
乔ined:2018-06-20 08:07
Hello

Hello

    我am currently using
  • 我QD 064296, 16MHz, 8pF
  • 我QD 009678, 32.768kHz, 12pF
    我just ordered
  • ECS-160-10-33-AGM-TR, 16MHz, 10pF
  • 我QD 009709, 32.768kHz, 7pF

To replace them.

我will try to start changing the 32k quartz to see if the trimming function is able to stabilize the 16MHz/8pF. If it does not then I will change the 16MHz too.

我will keep you informed if I manage to use only RC oscillators. BSP clock init functions are mainly based on 16M clock so I have to look deeper into the code.

Thanks

PM_Dialog
Offline
Last seen:22 hours 4 min ago
Staff
乔ined:2018-02-08 11:03
Hi bobspam@free.fr,

Hibobspam@free.fr,

Please, keep me in touch and let me know if you have any other issues. If you found any of the above answers useful please mark one of them as accepted.

Thanks, PM_Dialog

bobspam@free.fr
Offline
Last seen:1 month 4 weeks ago
乔ined:2018-06-20 08:07
Hello

Hello

我managed to change 32k quartz and I do confirm that IQD 009709, 32.768kHz, 7pF works with DA14683.
我still did not changed 16M quartz and the result is still the same. 16MHz does not start.

This quartz is inside the spec so trimming function should be able to stabilize it.

Can you confirm to me that trimming function can be used to compensate the missing 2pF of the 16MHz clock ?
我n my case, the 0x50000002 / CLK_FREQ_TRIM_REG is equal to 0x200.

Thank you in advance

bobspam@free.fr
Offline
Last seen:1 month 4 weeks ago
乔ined:2018-06-20 08:07
Hello

Hello

Can you please confirm to me that ECS-160-10-33-AGM-TR is working with DA14683 ?

Thank you in advance

PM_Dialog
Offline
Last seen:22 hours 4 min ago
Staff
乔ined:2018-02-08 11:03
Hi bobspam@free.fr,

Hibobspam@free.fr,

延迟道歉。你能澄清your question? The question is if the trim value is correct or how you can change the trim value? Regarding your second question for the ECS-160-10-33-AGM-TR XTAL, we have never used this type of crystal oscillator in our designs. According to its specifications, the 10p load capacitance would be good, but the ESR is on the high side and the max drive power is on the edge. I would suggest you to check the recommended operating conditions for the 16MHz crystal oscillator from the DA14683 datasheet. You will see that the ECS-160-10-33-AGM-TR is on the edge of our specification, but this might not be an issue and this type of XTAL might be working with DA14683. Also, you can have a look at the crystal oscillator that we are using in our development boards.

Thanks, PM_Dialog

bobspam@free.fr
Offline
Last seen:1 month 4 weeks ago
乔ined:2018-06-20 08:07
Hello

Hello

我have three boards :
- one with IQD 064296, 16MHz, 8pF
- two with ECS-160-10-33-AGM-TR, 16MHz, 10pF

None of them works using default BSP settings.

My question might be some wise advice to solve this issue because I am loosing a lot of time (ie settings / quartz reference)

我can not use the RC16 as a "rescue" because UART signals are not timed properly and my application does not work.

Thank you in advance

bobspam@free.fr
Offline
Last seen:1 month 4 weeks ago
乔ined:2018-06-20 08:07
我took time to compare

我took time to compare various quartz and I do not understand your comment stating that the quartz is on the edge of the specification.

Please find attach some details about the quartz. The ECS-160-10-33-AGM-TR specs are very close to the 7M-16.000MEEQ-T used on the USB demo board. In particular they both have a Max Pdrv of 100µW (while note 23 of DS v2.2 specify that it should be a minimum)

Thank you in advance

bobspam@free.fr
Offline
Last seen:1 month 4 weeks ago
乔ined:2018-06-20 08:07
One small detail : 1V4 is not

One small detail : 1V4 is not powered up. 0V.
我t seems that the problem is not in the XTAL part !

To be continued...

PM_Dialog
Offline
Last seen:22 hours 4 min ago
Staff
乔ined:2018-02-08 11:03
Hi bobspam@free.fr,

Hibobspam@free.fr,

我would strongly recommend you to check all the power rails of you custom board. Probably, the crystal oscillator might not be the cause why your board is not working. Also, a general review of your board would be very helpful in order to clear the things out.2

Thanks, PM_Dialog

bobspam@free.fr
Offline
Last seen:1 month 4 weeks ago
乔ined:2018-06-20 08:07
Hello,

Hello,

Unfortunately, none of my 3 boards have all power rails available.

我only have one that have 1.4V available and I do confirm that IQD 064296 16MHz, 8pF is working.
The oscillation is stable with 250mV amplitude. DC offset of 350mV. It is not a perfect sinus waveform.
我will have to compare with demo board to have a better idea of its compliance with the DA14683.

Thank you for your help.

PM_Dialog
Offline
Last seen:22 hours 4 min ago
Staff
乔ined:2018-02-08 11:03
Hi bobspam@free.fr,

Hibobspam@free.fr,

我t would be worth to compare your custom board with our Dev-Kits. If you have any other follow-up questions, please create a new forum thread.

Thanks, PM_Dialog

bobspam@free.fr
Offline
Last seen:1 month 4 weeks ago
乔ined:2018-06-20 08:07
Hello

Hello

Can you please confirm to me the importance of Note 23 in D14683 Device Specification v2.2 stating that the Pdrv of the Quartz should be at least 100µW ?

The USB demo board have a quartz that is maximum 100µW.

Thank you in advance

PM_Dialog
Offline
Last seen:22 hours 4 min ago
Staff
乔ined:2018-02-08 11:03
Hi bobspam@free.fr,

Hibobspam@free.fr,

According to the DA14683 datasheet, you select a crystal which can handle a drive level of at least of 100µW.

Thanks, PM_Dialog

bobspam@free.fr
Offline
Last seen:1 month 4 weeks ago
乔ined:2018-06-20 08:07
Hello

Hello

我just received my three boards from production again.

我do confirm that
- IQD 009709, 32.768kHz, 7pF
and
- IQD 064296, 16MHz, 8pF
- ECS-160-10-33-AGM-TR, 16MHz, 10pF

are OK with DA14683.

PM_Dialog
Offline
Last seen:22 hours 4 min ago
Staff
乔ined:2018-02-08 11:03
Hi bobspam@free.fr,

Hibobspam@free.fr,

Glad that your new designed boards are full functional and thanks for letting me know.

Thanks, PM_Dialog

Sparta
Offline
Last seen:1 year 3 weeks ago
乔ined:2016-03-14 14:22
你好,对话框专家。我

你好,对话框专家。我received daughter board on DA14683. Try to implement ble_adv example. When try to debug I see that ble_peripherial_start stucks. What can be the reason of that.

PM_Dialog
Offline
Last seen:22 hours 4 min ago
Staff
乔ined:2018-02-08 11:03
Hi Sparta,

Hi Sparta,

Could you please run it in debug mode and indicate where the code gets stuck? Also, I would suggest you to create a new forum post, as this one is not related with your issue.

Thanks, PM_Dialog