STM32L152 stuck at startup and dont enter Main
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-01 7:34 AM
Hi everyone,
I'm trying to connect STMl152 at Debug mode (JTAG) but with no success. If i tracing the startup it stuck in SetSysClock (''system_stml1xx.c'') function on : /* Wait till PLL is used as system clock source */ while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS) != (uint32_t)RCC_CFGR_SWS_PLL) { } In the command window : ''Cannot access Memory''. Please advise,- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-01 7:37 AM
What are the chances your PLL or Flash Wait State settings are wrong?
Look at the code prior to this, you're looking at the symptom, not the cause.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
‎2014-12-01 8:04 AM
Thanks for the replay Clive.
Where exactly can I look ?? ...All the prior code to that are the original library startup files.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-01 8:12 AM
Hi,
Try to connect using the ST-Link Utility, erase chip and the re-connect after loading your code again.-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-01 8:17 AM
Hi Mayla,
Why should I move to ST-Link Utility, I'm using Keil connect through ULINK2 , it should work , No??- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-01 8:43 AM
Where exactly can I look ?? ...All the prior code to that are the original library startup files.
Well you're going to have to consider all the code from the reset vector to the point it jams up. Starting with the code nearest to the observed failure, and moving backward. And consider how your design (external crystals, etc) impact the settings used for the clocks, PLL, etc. If these are different you need to evaluate how these need to differ from the default setting.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
‎2014-12-04 2:00 AM
Unfortunately
I couldn't find any issue regarding FLASH time or PLL. So I took from STM32L1xx_StdPeriph_Template the MDK-ARM example , built on it the project and it works fine. Thanks.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-09 2:04 AM
I have to open this issue again,
As i told before when i use STM32L1xx_StdPeriph_Template the MDK-ARM example it work. Now .... using same hardware and same project folders (MDK-ARM), but arrange differntly the folders it doesn't work --> again stuck before entering the Main (with memory access issue). Offcourse all files are compiled again. Now it doesn't seemed like clk/Flash wrong configuration (because I'm using same files that works). Please advise.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-12-09 4:34 AM
If the failure is occurring at the project level, then you'll need to ponder the defines passed to the compiler, and the include file search paths.
Up vote any posts that you find helpful, it shows what's working..
