2017-05-03 06:39 AM
Hi,
We have a custom designed STM32L151R board. We have not been able to flash the code using the flash loader application (demonstrator gui) . We are able to load the code using ST-Link and the serial port works properly when configured through the code. Is this an inherent problem of the controller or are we doing something wrong? We need to get the serial boot loader working as there may be site updates. Thank you for your time. Awaiting your suggestions to solve the problem.
Note: this post was migrated and contained many threaded conversations, some content may be missing.2017-05-08 10:49 AM
Hi Clive One,
I have checked signal levels on USART2 Rx pin. It is high (due to pull-up resistor). I have also seen the document mentioned by Max. Everything looks good still the controller is not responding in boot mode. I have not checked 7f command at such low baud rate. I will test and update. Again when programmed using ST Link, application code works like charm (serial port sends and receives bytes properly).
2017-05-08 11:32 AM
Are you sure it supports USART2. Try USART1 on PA9/PA10.
Appreciate that ST-LINK and USART2 function in normal operation, but System Loader has specific pins and bit time measurements.
2017-05-08 12:27 PM
Current loader version looks to support USART1 PA9/PA10 and USART2 PD5/PD6
2017-05-11 10:51 PM
Hi Clive One,
I am using a 64 pin device and pins for USART2 are PA2 and PA3. I don't have PORT D on this device. I have a pull-up resistor on USART2 Rx pin. Tried testing the device at 9600 with 8E1 by sending 0x7f (hex) The reply is, once 00 and next time 7f. Tried even 57600 but no change. Any other suggestions please? Thank you.
Regards
2017-05-11 11:37 PM
Clive's comment is right: There is a document telling which peripheral and which GPIO are covered by the chosen STM32 flashloader. It's a document to check before doing PCB schematics. IAP (In Application Programming) seems to be the way if the board is fixed
2017-05-14 09:27 PM
As Clive said you must use USART1 PA9/PA10 orUSART2 PD5/PD6.
Any other pin will fail including
PA2 and PA3.
This is probably the reason of your troubles...
2017-05-23 08:12 PM
you can also use the STLink utility.
After connecting you see the device ID and dice revision on the main screen.
2017-05-25 12:40 AM
Have a look at this:
https://community.st.com/videos/1417-stm32-uartbootloader-howto
2017-05-25 04:26 AM
Hi Max and Clive One,
Here is the ID
got from ST_Link.
2017-05-25 04:32 AM
Hi Gidi M,
We had been using STM series controllers for some time. We never faced any problem with STM32F103 controllers. We programmed these controllers using the 'Demonstrator GUI '. We were never able to load code into this controller using the USART boot. We have problems with STM32F407 controllers also, but they work some times and don't other times. I will watch the video fully and see if I am making any mistakes. Thank you.