cancel
Showing results for 
Search instead for 
Did you mean: 

How can I rewrite peripheral block? My MCU is STM32F103VCT6?

DBara.11
Associate II

Hi, community!

I had a problem, when chip burned out in my device, I bought new. I installed it in the main board and programmed Flash Memory. All passed success, a device works, but there are some bugs. I assume that the peripheral devices are incorrectly configured. But I don't succeed to program the peripheral block of memory, that is start address - 0x4000 0000 and ends address - 0x5fff FFFF. I tried to program each section of the block separately, starting at address 0x4000 0000, with size 0x3ff .For example, on the block of RTC, ST Link Utility shows an error: Programming error @: 0x40002804. I have firmware for each section with size 0x3FF. What can it be with constrained? How can I program periphery? Thanks in advance.

4 REPLIES 4

They aren't memory cells, in many cases the values written can't be read back, ie USART->DR you write a transmit register, you read back a receiver register, and USART->SR reports internal status of the USART, not anything you wrote in.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thanks great, I got it. So, have I any ways to configure the peripherals using by ST Link utility and ST-Link/V2 programmer? I'm beginner, and I have a little experience. 

>>I'm beginner, and I have a little experience. 

Ok, so WHY are you doing this? What purpose does it serve?

The ST-LINK is capable of peeking and poking memory within the device, the debugger would do this to probe peripherals, etc. but it's not how you typically program the device. Usually you write your own code to set up the peripherals, and download and execute that code on the target.

You could turn off verification?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

So, for set up peripheral, i need to write my own code and download to the target and execute it. I don't know how I to do this. How expert in your own field, could you recommend for me a book, which explain this in " simple words"?

Thanks in advance.