My current Compiler environment is the following:
IDE-Version: µVision V5.25.2.0 Copyright (C) 2018 ARM Ltd and ARM Germany GmbH. All rights reserved.
Tool Version Numbers: Toolchain: MDK-ARM Plus: 3 user Version: 5.25.2.0 Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin C Compiler: Armcc.exe V5.06 update 6 (build 750) Assembler: Armasm.exe V5.06 update 6 (build 750) Linker/Locator: ArmLink.exe V5.06 update 6 (build 750) Library Manager: ArmAr.exe V5.06 update 6 (build 750) Hex Converter: FromElf.exe V5.06 update 6 (build 750) CPU DLL: SARMCM3.DLL V5.25.2.0 Dialog DLL: DARMSTM.DLL V1.68.0.0 Target DLL: ULP2CM3.DLL V2.209.20.0 Dialog DLL: TARMSTM.DLL V1.66.0.0
I have to develop a c - program program for a STM32F103 CPU using the ST-Lib source code to access the underlying hardware. I'm using the USART hardware of this chip to do communication with an external device and I have to do write operations to the flash memory provided by the CPU. I also use the SystemClock timer to do time related jobs and I have to do communication using the CAN interface. The system timer generates communication through the USART interface and the program has to read back the response,that the exetrnal device device generates and evaluates the response.
The program doesn't use any RealTime extensions. The function of the program is correct until I do any write operations to the CPU internal flash. While this flash operation is active, the attempt to write a flash memory will bring the serial communication through the USART interface to crash.
My question is now:
Which hardware devices of the CPU are disabled while the flash write operation is active. What can I do to solve this problem ?
Best regards
idex-corp user
"Which hardware devices of the CPU are disabled while the flash write operation is active"
That has nothing to do with Keil - you would have to check the ST documentation for that.
"What can I do to solve this problem"
Again, depends on the ST hardware - nothing to do with Keil.
ST forum is here: http://community.st.com/s/
Thank you !
As in http://www.idexcorp.com/ ?
Do you not have FAE support from ST? Or your distributor(s)?
No, we don't have such FAE support from ST.
I have to use the ST forum to solve this problem. I still have to check the ERRATA information, if there is an known bug inside the ST library.
Again: Thank you for your advice !
Writing or Erasing the FLASH will stall the processor with wait states if you execute code in FLASH, or otherwise try to read it at the same time. These delays will be significant and will block interrupts, etc. This may exceed the service time required by peripherals with specific byte-time servicing requirements, resulting in underflow and overflow conditions.
Run code from RAM to avoid this.
"Run code from RAM to avoid this."
This helped me a lot !
Now it functions perfectly.
Thanks in advance for your help !