External Crystal not working on STM32L073Rz Nucleo Board.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-12-26 6:51 AM
The Nucleo Board takes clock (8MHz) from ST- Link Programmer and we want to switch it to external (8MHz) crystal which is not working.
We programmed the RCC->CR register to 0X03030300U so that it sets to external crystal but it shows 0X03050305U ( HSEBYP, HSEON, HSI16RDYF, HSI16ON is set).
This is making the uC to operate on its internal clock.
Everytime the HSERDY bit is zero that says that the External clock is not stable.
We tried changing different external crystal's of 8MHz on the STM32L073RZ Nucleo Board and also changed different values of cap's (18pf, 20pf, 27pf, 33pf) but none of them worked.
Please guide.
- Labels:
-
STM32L0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-12-26 8:25 AM
BYPASS is not the mode you want for an external crystal ​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-12-26 8:27 AM
No we are not using HSEBYP,
We are setting 0X03030300 which set the HSEON and clears HSEBYP.
Only issue is that the HSERDY bit is not set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-12-26 9:56 AM
Sorry, I'm not going to decode the register level stuff on this.
Use the library examples, they are known to work.
Make sure all the other connections to the chip from the ST-LINK 8MHz source are removed.
Review the BOM for the parts/values used by ST.
Review the Crystal Oscillator App Note, and check the parts recommend, and computation for crystal load caps.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-12-26 10:58 AM
Thank you for all your support.
All the connections including the resistors, caps of 20pF and 8MHz crystal are properly connected at its place.
Have done after reviewing the BOM and schematics from ST.
If any other info most welcome.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-12-26 12:46 PM
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0];
/* Enable HSE Oscillator and activate PLL with HSE as source
PLLCLK = (8 * 12) / 3) = 32 MHz */
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
RCC_OscInitStruct.PLL.PLLDIV = RCC_PLL_DIV3;
HAL_RCC_OscConfig(&RCC_OscInitStruct);
}
Bring up the oscillator, ideally feed to MCO PA8 and scope there, or check if it starts directly.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-12-27 5:20 AM
We need the same 8Mhz Clock as the STlink programmer gives to the main microcontroller (STM32L073RZ).
Need to use only HSE only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-12-27 6:18 AM
Ok, and does the code above start the crystal, or not?
If it does not you need to focus on the electrical issues.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-12-27 6:24 AM
We were able to solve the issue using Keil IDE, but our complete code is in mbed OS and there the issue still persists.
If anyhow this issue is solved in mbed OS its done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-12-27 10:53 AM
Then you'll need to review what that code is doing compared to the sequencing prescribed by ST for bringing up the clocks properly.
Up vote any posts that you find helpful, it shows what's working..
