Hello,
I am working on STM32F103ZGT6 with Keil Compiler. The version of Keil & other info are as below, IDE-Version: µVision V4.23.00.0
Tool Version Numbers: Toolchain: MDK-ARM Standard Version: 4.23 Toolchain Path: C:\Keil\ARM\BIN40 C Compiler: Armcc.Exe V4.1.0.894 Assembler: Armasm.Exe V4.1.0.894 Linker/Locator: ArmLink.Exe V4.1.0.894 Librarian: ArmAr.Exe V4.1.0.894 Hex Converter: FromElf.Exe V4.1.0.894 CPU DLL: SARMCM3.DLL V4.23 Dialog DLL: DARMSTM.DLL V1.63.0.0 Target DLL: UL2CM3.DLL V1.95 Dialog DLL: TARMSTM.DLL V1.60
I am facing a weird problem, that STm32 is resetting for the smallest change in Code.
For example : #define GuiConst_DISPLAY_WIDTH_test 480 #define GuiConst_BYTE_LINES_test 272 #define GuiConst_DISPLAY_BYTES_test (GuiConst_DISPLAY_WIDTH_test*GuiConst_BYTE_LINES_test)
And somewhere in my code, I have statements as below. for(i = 0; i < (GuiConst_DISPLAY_BYTES_test); i++) { LCD_Data_Disp_Transfer(k); } , If the above code is present, the micro is working properly, where "GuiConst_DISPLAY_BYTES_test" is a Macro as defined above.
If I change it to "GuiConst_DISPLAY_WIDTH_test" in "for" loop, the STM32 starts resetting once it is in Debug Mode, it resets automatically every one sec automatically. Actually it is not reaching till this "for" loop at all. I can see that, it is entering into "main()", but after executing some functions in "main()", it resets automatically.
Can you please tell me, what could be the problem. Should I have to update Keil, for this new STM32F103ZT6. Please guide me.. I have wasted lot of time in trail and error.
I have just posted an example where it is affecting.. But actually it is affecting in many more places. For many more changes. it is becoming difficult for me to do any changes and debug my development.
Rgds Shankar B T shankar.tangai@ika.in
Hmm,
I am quite confused about these settings.
In STM32 there is a Memory Space "FSMC bank1 & bank2", which is located at location 0x60000000 till 0x6FFFFFFF. As the SRAM size of STM32103FZGT6 is 96K, I feel, I need more RAM to store the Display Data, which is in "GuiLib_DisplayBuf[][]" of size 261120 bytes.
Frankly telling, I dont have much idea of Scatter File.
I just want a solution for allocating the variable "GuiLib_DisplayBuf[][]" to FSMC bank location of STM32. During declaration of "GuiLib_DisplayBuf[][]" as below I have allocated it to 0x60020000.
typedef union { GuiConst_INT8U Bytes[GuiConst_BYTE_LINES][GuiConst_BYTES_PR_LINE]; GuiConst_INT16U Words[GuiConst_BYTE_LINES][GuiConst_BYTES_PR_LINE/ 2]; } DisplayBufUnion; extern DisplayBufUnion GuiLib_DisplayBuf __attribute__((at(0x60020000)));
After doing this, i am getting a warning
.\ST\stm32_testprojekt.sct(19): warning: L6314W: No section matches pattern *(ZI).
with build details
Program Size: Code=46242 RO-data=38542 RW-data=316 ZI-data=408852
I dont know exactly, what is this ZI.
Now, I want to know what changes should be done in scatter file or any other file.
Rgds Shankar
No. It isn't your line:
extern DisplayBufUnion GuiLib_DisplayBuf __attribute__((at(0x60020000)));
that is generating the warning.
It's your change to the scatter file that is generating the warning.
ZI, by the way, stands for zero-initialized variables.
Why do you manually create a scatter file, unless you use any features that requiers a scatter file? If you use your "at" declaration in the code, and add the address range of your external RAM in the project settings, you can ignore that scatter file.
But whatever you do, you must make sure that the startup file configures the memory controller for that external RAM range.
This example shows how to use the external SRAM mounted on STM3210E-EVAL or STM32100E-EVAL board as program data memory and internal SRAM for Stack. This example doesn't use the default library startup files. Use the EWARM, MDK-ARM, HiTOP, RIDE or TrueSTUDIO startup files provided within this folder.
/**********************/ Just a quick point - remember I was swagging it and havent a scoobie about your hardware!
Does the display have built in display RAM ? - Do you have the commands to read/write to the display RAM ? ( if this is the case you just set up the micro as standalone and set up the FSMC to drive the display - loads of examples of that.
If your using emWin and a display they support check the Keil boards examples to see what needs to be done.
I doubt its the compiler version that needs to changed just getting the right hardware config etc
Thank you very much to all of you.
Thanks a lot for your valuable time. I will work a little bit and learn it properly in the Documents referred by you..
If any further doubts, will post my comments here..
Thanks Shankar