2018-01-10 10:54 PM
I have a Murata LoRa SOC from which I have made up a custom board and I am flashing code using UART which wasn't successful until help from
https://community.st.com/people/Turvey.Clive.002
Now I am using stm32flash open source software for flashing of code but after successful flashing I still am not even able to blink a LED using the flashed code. While the software did work when flashed to DISCOVERY kit.
I reckon this must be because the ICs aren't shipped with bootloader? Is it? But then how did the flashing work? I am so confused. Please help.
PS: Boot configurations are perfectly alright.
#stm32l0 #b-l072z-lrwan1 Note: this post was migrated and contained many threaded conversations, some content may be missing.2018-01-11 10:29 AM
You'll have to add instrumentation to Reset_Handler and do some diagnostic work like I outlined earlier.
BOOT0 show be low for FLASH code to be executed at reset.
If using SWD attached debugger in Keil, uncheck 'Run to main()' to step from Reset_Handler onward.
2018-01-11 05:24 PM
Why are you not using the debugger??
2018-01-11 06:24 PM
No SWD connectivity
https://community.st.com/0D50X00009XkX27SAF
Going to need to code some signs-of-life and check-point code into Reset_Handler and work through the darkness to see where things get tripped up.
These are cases where you want to have debug pins on test points, edge castellations, or via internal traces to parts of the board that get routed or broken off.
2018-01-11 10:10 PM
For the next design I shall have ST Link's connectivity but for now I shall be trying out with UART which does not seem to work after a reset. Will try all the workarounds possible from my side
2018-01-11 10:20 PM
Neil.Andrew
Turvey.Clive.002
meyer.frank
Thank you all for your help now that I am nearly complete with flashing of the code using STM32Cube Programmer I get this error
Error: GETID command not acknowledged!
I hope this will give you a better picture of what is happening. Just to revisit the situation,
'I have been able to flash the code using USART and configuration BOOT0->HIGH, also I get to see the output as I want but as soon as I power OFF my board and turn it ON again, I am unable to see the output but if I open STM32Cube Programmer and check the memory address, the binaries from my application and chip memory match'
What could be the possible reason and solution?
Thank you so much and sorry for asking so many questions.
2018-01-12 01:22 AM
Ha ha: 'An unexpected error has occurred' !
:(
Seems madness to not provide debug connectivity - as this thread amply demonstrates!
Not having debug access is like deliberately tying your hands behind your back!
So now you're stuck with things like UART trace, and signalling on LEDs ...
Can you not debug this on a Discovery or Nucleo board?
2018-01-12 01:35 AM
Well the same program works perfectly fine on a Discovery board. And as far as debug connectivity is concerned, I have learnt a lesson but I have no time left; I need to find solution to this and I am already trying out all permutations and combinations to make sure I get over it.
2018-01-12 06:49 AM
Having established that the discovery board works you now need to do some simple and incremental tests with code placed in the Reset_Handler to enable GPIO and/or UART connectivity to confirm some level of functionality.
2018-01-12 08:06 AM
Reset_Handler in startup asm file?