ST Visual Programmer (STVP) Online Help Contents · Toolbar: The toolbar contains a number of...
Transcript of ST Visual Programmer (STVP) Online Help Contents · Toolbar: The toolbar contains a number of...
STVisualProgrammer(STVP)OnlineHelpContents
GeneralInformationIntroductiontotheSTVisualProgrammerVisualenvironmentToolbarTabmenuDisplayareaDevicestatusareaFlashsectorareaOutputareaStatusbar
MenuReferenceFilemenuEditmenuProjectmenuConfiguremenuReadmenuProgrammenuVerifymenuErasemenuBlank-CheckmenuViewmenuHelpmenu
WorkingwiththeSTVisualProgrammer
AtypicalprogrammingsessionFileoperationsOpenafileEditafileSaveafileWriteapatterntoaselectedmemoryareaExecuteafileinRAMCheckingmemoryisblankProgrammingProgrammemory,DatamemoryandOptionsbytesseparatelyProgrammingProgrammemoryProgrammingDatamemoryProgrammingOptionbyteErasingFLASHmemorysectorsViewingaSTmicrocontroller'smemorycontentsandoptionsettingsVerifyingaSTmicrocontroller'smemorycontentsandoptionsettingsHowtorestoredefaultRCCalibrationvaluesUsingprojectsWhatisaproject?CreatinganewprojectOpeningaprojectEditingaprojectSettingaprojecthardwareenvironmentSettingEPROM,EEPROMorOptionfileinprojectSettingupautomaticprogrammingproceduresSettingupautomaticserialnumbergenerationExecutingaprojectprogrammingcycle
Troubleshooting
IntroductiontoSTVisualProgrammer(STVP)
STVPisaWindowsinterfacethatletsyou:View,editandsaveexecutablefilesintheHex(Intel)and.S19(Motorola)formats,generatedbytheAssembler,LinkerorCCompilerforSTmicrocontrollers.
BlankCheckEPROMorFLASHcontentsofSTmicrocontrollers.
ProgramEPROM/EEPROM/FLASH/OptionByteofSTmicrocontrollers.
EraseFLASHSTmicrocontrollers.ViewandverifyaSTmicrocontroller'smemorycontents.
STVPistheuserinterfaceforSTEPROMProgrammingBoards(EPBs)andSTDevelopmentKits(DVPs).ItisinstalledonaPCrunningWindows®98,Millennium®,2000®,NT®,XP®orVista®,connectedtotheEPBorDVP.TwomethodscanbeusedtoprogramSTmicrocontrollerswithSTVP:youcaneithercreateaprojectthatdefinestheprogrammingenvironmentandproceduretofollow,orloaddatafromthemasterdeviceandthenprogramit.Werecommendthatyouuseprojects,sincetheyprovideyouwithgreatercontrolovertheprogrammingprocedure.NOTES:1:STVPconfiguresitselfinordertodisplayonlytheexistingmemoryareaforeachdevice.2:UnderWindows®NT®4,2000®,XP®andVista®,duringinstallationofSTVP,PARSTMdriverversionischeckedandcomparedtotheoneinstalledonthePC:ifPARSTMdriverisnotinstalledorPARSTMdriverversionislessthan1.5,itwillbeinstalled.
Visualenvironment
BelowisascreenshotoftheSTVPmainwindowwiththemainareasofinteresthighlighted:
Thedifferentareasonthisscreenare:Titlebar:ThetitlebardisplaysthenameoftheprojectcurrentlyopenedinSTVP.Ifnoprojectisopened,then'noproject-STVP'isdisplayed.
Menubar:ThemenubarcontainspulldownmenusforaccesstotheprincipalSTVPfunctions.
Toolbar:ThetoolbarcontainsanumberofbuttonswhichprovideanothermeansofaccesstotheprincipalSTVPfunctions.Placethemousepointeroverabuttontodisplayapopupwhichdescribesthefunctionofthatbutton.
Devicestatusarea:Thedevicestatusareadisplaysthecurrenthardwareconfigurationandsettings.
Displayarea:ThedisplayareadisplaysthedetailsthatarestoredintheSTVPbufferforthecurrentlyselectedtab(seetabmenubelow).
Flashsectorarea:Theflashsectorareaallowsyoutoselectparticularsectorsofprogrammemoryonwhichtoperformactions.
Tabmenu:Thetabmenuallowsyoutodisplayaparticularmemoryareainthedisplayarea.
Outputwindow:TheoutputwindowdisplaysthetasksthatareperformedbySTVPasitperformsthem.
Statusbar:ThestatusbardisplaysthecurrentattributesassociatedwiththeEditwindow.
Themenubar,toolbarorinformationareacanbetransformedintoindependentalways-on-topwindowswiththeirownheaders,asshownbelow,byleftclickingontheirrespectivemovetabsanddraggingthemover(orpartover)thedisplayareaorontothedesktopoutsidetheframeoftheSTVPmainapplicationwindow.Inthisfloatingformtheymayberelocatedbymousedraggingonthewindowtitlebaroranyunoccupiedareainthewindow.Theseareasmayberesizedinthestandardmannerbydraggingontheedgeoftheframe(doublearrowcursorindicatesresizedimension).
InthesamemannertheseareasmaybepickedupandrepositionedanywhereintheSTVPmainapplicationwindow.Usetheresizecursortoresizethedisplayarea,devicestatuswindow,flashsectorareaandoutputwindowrelativetoeachother.
Toolbar
Thediagrambelowshowstheiconsofthetoolbar:
NOTE:TheEraseiconandtheEraseAlliconaregrayedoutiftheSTmicrocontrollerbeinguseddoesn'thaveFLASHmemory.
Descriptionoftoolbaricons:SaveFileicon:Savesthecurrentfile.OpenFileicon:Opensafile.ExecuteFileicon:ExecutesafileinRAM.Copyicon:Copiesthecontentsofthewholebuffertotheclipboard.
Fillicon:Fillsaspecifiedareawithaspecifiedvalue.Configureicon:ConfiguresHardware,Port,ProgrammingmodeandDevice.
STmicrocontrollertypelist:ListstheSTmicrocontrollersthatcanbeprogrammedwiththehardwaredevicethatiscurrentlyconnected,allowingyoutochooseone.ThisisashortcutforchoosingtheSTmicrocontrollerdevicethatiscurrentlypluggedintothesocketwithoutopeningtheConfigurationdialogbox.
Readicon:ReadsanddisplaysthecontentsoftheSTmicrocontrollerrelatingtothecurrentlyselectedtab(ProgramMemory,DataMemoryorOptionByte)intheDisplayarea.
Programicon:Programstheinformationdisplayedinthecurrentlyselectedtab(PROGRAMMEMORY,DATAMEMORYorOPTIONBYTE)intheDisplayareatotheSTmicrocontroller.
Verifyicon:Checksthattheinformationdisplayedintheselectedtab(PROGRAMMEMORY,DATAMEMORYorOPTIONBYTE)intheDisplayareaisthesameasthatintheSTmicrocontrollerthatispluggedintothehardwaredevice.
BlankCheckicon:ChecksthatthememoryareaoftheSTmicrocontrollerpluggedintothehardwaredevicehasnotbeenwrittento.
Eraseicon:ErasesselectedFLASHmemorysectors.ReadAreaRangeicon:ReadstheselectedareaofmemoryfromtheSTmicrocontrolleranddisplaysitintheDisplayarea.
ProgramAreaRangeicon:ProgramsthecontentsoftheselectedmemoryareatotheEPROM,FLASHorEEPROMoftheSTmicrocontroller.
VerifyAreaRangeicon:Checksthattheinformationoftheselectedareaofmemory(EPROM,FLASHorEEPROM)heldin
theSTVPbufferisthesameasthatprogrammedinthesameareaofmemoryintheSTmicrocontroller.
ReadAllicon:ReadstheEPROM,FLASH,EEPROMandOptionsinformationfromtheSTmicrocontrolleranddisplaysitintheDisplayarea.
ProgramAllicon:ProgramsthecurrentEPROM,FLASH,EEPROMandOptionsdatafromSTVPtotheSTmicrocontroller.
VerifyAllicon:ChecksthattheEPROM,FLASH,EEPROMandOptionsinformationintheSTVPbufferisthesameasthatprogrammedintheSTmicrocontroller.
Displayarea
DisplaysthedetailsthatarestoredintheSTVPbufferforthecurrentlyselectedtab(ProgramMemory,DataMemoryorOptionByte).Right-clickingonthisareaopensacontextualmenuoffrequently-usedcommands,suchasread,program,verifyandsoon.
Devicestatusarea
Displaysthecurrentprojectname(ifany),thecurrenthardwareconfiguration,includinghardwareprogrammingtool,programmingmode,STmicrocontrollerdevicenameandPCcommunicationport.Italsoshowstheprogrammemory,datamemoryandoptionbytestatusoftheselecteddevice.Right-clickinginthisareaopensacontextualmenuwiththerefreshandcopycommands.The*characterattheendofeachmemorystatusnameindicatethattheareahasbeenmodified.Ifafileisloaded,thischaracterisremoved.
NOTE:Todisplay/hidethedevicestatusareaselectDeviceStatusfromtheViewmenu.
Flashsectorarea
WhentheselectedSTmicrocontrollerhasFLASHmemorythenthisareaisdisplayed.ToselectasectorofFLASHmemory,clickonitscheckbox.WhenActiveSector(s)ischosenfromtheRead,Program,Verify,EraseorBlank-Checkmenus,thecorrespondingactionisonlyperformedontheselectedsectors.
NOTE:Todisplay/hidetheflashsectorareaselectFlashSectorfromtheViewmenu.
Tabmenu
Withthesetabs,youcandisplayamemoryarea.Onlytabsofexistingmemoryareasofadevicearedisplayed.Therearedifferentcombinationsoftabmenus,herearetwoexamples:DevicewithProgramandDatamemory:
DevicewithProgrammemoryandOptionByte:
Outputwindow
DisplaysthetasksthatareperformedbySTVPasitperformsthem.Right-clickingonthisareaopensafrequently-usedcommandsmenu,enablingyoutoclearorcopythecontentsoftheoutputareatotheclipboard.Anexampleoftheoutputwindowafterloadingafileisshownbelow:
Statusbar
Thediagrambelowshowsthestatusbar:
Descriptionofstatusbar:Progressbar:IndicatestheprogressofthecurrenttaskbeingexecutedbySTVPduringlengthyoperations.AredindicatorindicatesthattheSTmicrocontrollerisbeingprogrammedandshouldnotberemoved.DoingsomaydamagetheprogrammingdeviceortheSTmicrocontroller.Theprogressindicatorisgreenforotheroperations.Theprogressbaralsoindicateswhatthecommandthatiscurrentlypointedtodoes.
Addressfield:Indicatestheaddressofthecharacteronwhichthecursoriscurrentlyplacedinthedisplayarea.
Hardwarename:IndicatesthenameoftheprogrammingboardcurrentlyselectedintheConfigureSTVisualProgrammerwindow.
Devicename:IndicatesthenameofthemicrocontrollercurrentlyselectedintheConfigureSTVisualProgrammerwindow.
Programmingmode:IndicatesthenameoftheprogrammingmodeselectedintheConfigureSTVisualProgrammerwindow.
Filemenu
Thiscommand: Doesthis:Open... Opensafile.Save Savesthecurrentlyopenfile.
SaveAs... Savesthecurrentlyopenfileunderanewname.
RAMExec ExecutesafileinRAM.Exit ExitsSTVP.
Note:IntheRecentFileareaofthemenuwillappearalistofthelastfilesthatyouused.Clickingonanameinthelistopensthatfile.
Editmenu
Thiscommand: Doesthis:
Goto... Movesthecursortoaspecifiedaddress.
Search... Searchesforbytesinthecurrentarea.
CopyAllCopiesthecontentsoftheselectedarea(selectedfromthetabmenu)totheclipboard.
Fillarea Fillsaspecifiedareawithaspecifiedvalue.
Preferences... Displaysthepropertieswindow.
Projectmenu
Thiscommand: Doesthis:New... Createsanewproject.Open... Opensaprojectfile.Save Savesaprojectfile.Edit Editsaproject.
Close SavesandClosesthecurrentprojectintoaprojectfile.
Thelistoffilenamesatthebottomofthemenuliststhelastprojectfilesthatyouused.Clickingonanameinthelistopensthatfile.
Configuremenu
WhenyouselectConfigureSTVisualProgrammerfromtheConfiguremenu(orpressthe button),theConfigurationdialogboxopens.Thisdialogboxallowsyoutochooseahardwareprogrammingtool,aPCcommunicationport,aprogrammingmodeandaSTmicrocontrollerdevice.
1. FromtheHardwarelist,selecttheprogrammingboardhardwarethatyouareusing(thespecificEPBorDVP,orSTICK).
2. FromthePortlist,selecttheparallelportonthehostPCtowhichtheEPBorDVPisconnected.Onlytheportsthatarecompatiblewiththeselectedhardwarearelisted.
3. FromtheProgrammingmodelist,selecttheprogrammingmodeyouwanttouse.Programmingmodesavailabledependuponthehardwareyouhave,andcaninclude:
Socket-ThisoptionmeansthatyouwishtoprogramyourtargetSTMCUusingoneofthesocketsprovidedontheEPBorDVP.
ISP-ThisoptionisonlyavailablewithcertainEPBsandDVPs.ChoosethisoptionifyouwishtouseInSituProgrammingtoprogramadevicealreadymountedonyourapplicationboardviaaflexcableconnection
betweentheEPB/DVPandyourapplicationboard.ICP-OnlyavailableforFLASHdevices.ChoosethisoptionifyouwishtouseInCircuitProgrammingtoprogramadevicealreadymountedonyourapplicationboardviaaflexcableconnectionbetweentheEPB/DVPandyourapplicationboard.Forcertaindevices,twoICPmodesexists:"ICPOPTEnable"or"ICPOPTDisable",seethedetailsinprogrammingmode.
4. FromtheDevicelist,selecttheSTmicrocontrolleryouwanttoprogram.
5. WhensomedevicesintheDevicelistareselected(suchastheST7LITE09),anadditionalProtectionslistwillappearinwhichyoucanchoosetoprotectcertainvalueswhenprogramming.However,mostdevicesdonothavethisoption.InformationonRCCalibrationvaluesaregiveninHowtorestoredefaultRCCalibrationvaluestopic.
6. ClickOKtosaveyourchangesandclosethedialogbox.7. Toviewyourconfigurationsettings,selectDeviceStatusfromthe
Viewmenu.TheDeviceStatusareadisplaysthecurrentconfigurationsettings.TIP:YoucanalsoselectaSTmicrocontrollerfromthedrop-downlistinthemainwindowtoolbar.NOTE:TherearetwowaysofprogrammingaFLASHorEEPROMSTmicrocontrollerdevice.Youcanprogramitbypluggingitontothehardwareprogrammingtoolsocketandselectingthedevicename(STxxx)or,youcanprogramitbyusingtheEPBorDVPandanISPorICPconnectortoyourapplicationboardandselectingISPorICPprogrammingmodeandthedevicename.
Readmenu
Canincludethefollowingcommands:
Thiscommand: Doesthis:
CurrenttabReadsfromtheSTmicrocontrolleranddisplaysthecontentsoftheselectedmemorytab.
ActiveSector(s) ReadsfromtheSTmicrocontrolleranddisplaysthecontentsoftheselectedsectors.
AddressRange...ReadsfromtheSTmicrocontrolleranddisplaysthecontentsoftheselectedmemoryareafromtheselectedmemorytab.
AlltabsReadsfromtheSTmicrocontrollerthecontentsofallexistingmemoryandOptionbyteinformation.
Programmenu
Canincludethefollowingcommands:
Thiscommand: Doesthis:
Currenttab WritestotheSTmicrocontrollerthecontentsoftheselectedmemorytab.
ActiveSector(s) WritestotheSTmicrocontrollerthecontentsoftheselectedsector(s).
AddressRange...WritestotheSTmicrocontrollerthecontentsoftheselectedmemoryareafromtheselectedmemorytab.
AlltabsWritestotheSTmicrocontrollerthecontentsofallexistingmemoryandOptionbyteinformation.
Verifymenu
Canincludethefollowingcommands:
Thiscommand: Doesthis:
CurrenttabChecksthatdatadisplayedinselectedmemorytabisidenticaltothecorrespondingSTmicrocontrollermemory.
ActiveSector(s)Checksthatdatadisplayedinselectedsector(s)isidenticaltothecorrespondingSTmicrocontrollermemory.
AddressRange...
ChecksthatdatadisplayedintheselectedmemoryareafromthecurrentmemorytabisidenticaltothecorrespondingSTmicrocontrollermemory.
Alltabs ChecksthatallmemorydataandOptionbyteareidenticaltoSTmicrocontrollercontents.
Erasemenu
ThesecommandsarevalidonlyforFLASHmemoryoftheSTmicrocontroller.CanincludethefollowingcommandsThiscommand: Doesthis:ActiveSector(s) Eraseselectedsector(s).
Blank-Checkmenu
Canincludethefollowingcommands:
Thiscommand: Doesthis:
Currenttab Checksthatmemorydataincurrenttabisnotprogrammed.
ActiveSector(s) Checksthatmemorydatainselectedsector(s)isnotprogrammed.
Viewmenu
Includesthefollowingcommands:Thiscommand: Doesthis:
Toolbar Displays/hidesthetoolbar.WhenToolbarischecked,thetoolbarisdisplayed.
StatusBar Displays/hidesthestatusbar.WhenStatusBarischeckedthestatusbarisdisplayed.
DeviceStatusDisplays/hidesthedevicestatuswindow.WhenDeviceStatusischeckedthedevicestatuswindowisdisplayed.
OutputDisplays/Hidestheoutputwindow.WhenOutputischeckedtheoutputwindowisdisplayed.
FlashSectorDisplays/Hidestheflashsectorwindow.WhenFlashSectorischeckedtheflashsectorwindowisdisplayed.
NOTE:TheFlashSectorcommandisgrayedoutiftheSTmicrocontrollerdeviceinusedoesn'thaveFLASHmemory.
Helpmenu
Includesthefollowingcommands:
Thiscommand: Doesthis:
Index PresentsthisSTVPonlinehelp.
UsingHelp ExplainshowtouseHelp.
About... Givesinformationabouttheprogrammingtool(hardware&software).
Atypicalprogrammingsession
ThefollowinginstructionsdescribehowyoushouldprogramaSTmicrocontrollerusingSTVP.MakesurethattheSTmicrocontrollerispluggedintothehardwareprogrammingtoolsocket.
1. ConfigureSTVP.2. Openthefilesholdingthedatatoprogram.3. CheckthattheSTmicrocontrollermemoryhasnotalreadybeen
programmed:intheSTVPmainwindow,clickonBlank-Check>CurrenttaborBlank-Check>ActiveSectors.Oryoucanalsosetthe"Blankcheckbeforeprogramming"optionintheEdit/Preferencesdialogbox.
4. Executetheprogrammingsession:intheSTVPmainwindow,clickonAlltabsintheProgrammenu(orpressthe button).
5. Checkthattheprogramingsessionwassuccessfullycompleted:intheSTVPmainwindow,clickonAlltabsintheVerifymenu(orpressthe button).Orsetthe"Verifyafterprogramming"optionintheEdit/Preferencesdialogbox.NOTE:ForadditionalinformationrefertoUsingProjects/Whatisaproject?.TIP:PresstheESCkeytoaborttheprogrammingdeviceprocess.
Checkingmemoryisblank
Toblankcheckmemory:
1. MakesurethattheSTmicrocontrollerispluggedintothehardwareprogrammingtoolsocket.
2. Makesurethatthehardwareiscorrectlyconfigured,followtheinstructionsgiveninConfiguringSTVP.
3. ToblankcheckEPROMmemoryarea,clickonCurrenttabintheBlank-Checkmenu.ToblankcheckoneormoreFLASHsector(s):a. Selectthesector(s)tobeblank-checkedintheFlashsector
area.b. ClickonActivesector(s)intheBlank-Checkmenu.
4. TheblankcheckresultisdisplayedintheOutputwindow.
Programmingprogrammemory
ToprogramProgrammemory:
1. MakesurethattheSTmicrocontrollerispluggedintothehardwareprogrammingtoolsocket.
2. MakesurethatthehardwareiscorrectlyconfiguredbyfollowingtheinstructionsgiveninConfiguringSTVisualProgrammer.
3. IntheSTVPmainwindow,clickonthePROGRAMMEMORYtab.4. Openafilethatcontainsdataforaprogram.Youcanmodify
programmemorybeforewritingittoadevice.5. ToprogramallprogrammemoryinaFLASHdevice:
a. SelectallsectorsintheFLASHsectorarea.b. ClickonActiveSector(s)intheProgrammenu(orpressthe
button).6. ToprogramallprogrammemoryinanEEPROMorEPROMdevice,
selectProgram>Currenttabfromthemainmenu.7. Ortoprogramaselectedareaofprogrammemory:
a. ClickonAddressRange...intheProgrammenu(orpressthebutton).TheAddressrangedialogboxopens.
b. IntheValidaddressrangesarelist,choosethepredefinedrangeaddressyouwanttoprogramor,enteraddressesintheStart@andEnd@fields.
c. ClickonOK.8. Afterdatahasbeenwrittenintoprogrammemory,averifyoperation
isdone.AnydiscrepanciesarereportedintheOutputwindow.TIP:ProgrammemoryisalsowrittenbyclickingonAlltabsintheProgrammenu(orpressingthe button).NOTE1:Ifanyareaoftheprogrammemoryisalreadyprogrammed,anappropriatemessageisdisplayedintheOutputwindow.NOTE2:Tofindoutifanareaisprogrammed,followtheinstructionsgiveninCheckingmemoryisblank.
Programmingdatamemory
ToprogramDatamemory:
1. MakesurethattheSTmicrocontrollerispluggedintothehardwareprogrammingtoolsocket.
2. MakesurethatthehardwareiscorrectlyconfiguredbyfollowingtheinstructionsgiveninConfiguringSTVisualProgrammer.
3. IntheSTVPmainwindow,clickontheDATAMEMORYtab.4. Openafilethatcontainsdataforaprogram.Youcanmodifydata
memorybeforewritingittoadevice.5. Toprogramalldatamemory,selectProgram>Currenttabfromthe
mainmenu.6. Toprogramaselecteddatamemoryarea:
a. SelectProgram>AddressRange...fromthemainmenu(orpressthe button).TheAddressrangedialogboxopens.
b. IntheValidaddressrangesarelist,choosethepredefinedrangeaddressyouwanttoprogramor,enteraddressesintheStart@andEnd@fields.
c. ClickonOK.7. Afterdatahasbeenwrittenintodatamemory,averifyoperationis
done.AnydiscrepanciesarereportedintheOutputwindow.TIP:DatamemoryisalsowrittenbyclickingonAlltabsintheProgrammenu(orpressingthe button).
Programmingtheoptionbyte
ToprogramtheOptionbyte:
1. MakesurethattheSTmicrocontrollerispluggedintothehardwareprogrammingtoolsocket.
2. MakesurethatthehardwareiscorrectlyconfiguredbyfollowingtheinstructionsgiveninConfiguringSTVisualProgrammer.
3. IntheSTVPmainwindow,clickontheOPTIONBYTEtab.Theavailableoptionsarelisted.STMcuoptionbitshaveonlytwostates:0,1.Unprogrammedstatescouldbe0or1dependingonthedevice.
4. Tochangethestatusofanoption,clickontheoptionnameoritscurrentsetting.Clickonthebutton( )whichappearsbesidetheoptiontodisplayadropdownmenufromwhichyoucanselectanewsetting.
5. ClickonCurrenttabintheProgrammenu(orpressthe button).6. AftertheOptionbytehasbeenwritten,averifyoperationisdone.
AnydiscrepanciesarereportedintheOutputwindow.TIP:TheOptionbyteisalsowrittenbyclickingonAlltabsinsteadofCurrenttabintheProgrammenu(orpressingthe button).NOTE:Youcanmodifyoptionbytesettingsbeforewritingthemtothedevice.
EraseFLASHmemorysectors
ToeraseFLASHmemorysectors:
1. MakesurethattheSTmicrocontrollerispluggedintotheprogrammingsocket.
2. MakesurethatSTVPiscorrectlyconfiguredfortheSTmicrocontrollerbyfollowingtheinstructionsgiveninConfiguringSTVisualProgrammer.
3. IntheSTVPmainwindow,clickonthePROGRAMMEMORYtab.4. ForProgrammemoryonly:toeraseone(ormore)FLASHmemory
sector(s):a. IntheFlashsectorareaclickthecheckbox(es)corresponding
tothesector(s)youwanttoerase.b. ClickonActiveSector(s)intheErasemenu(orpressthe
button).c. ClickonOK.
Viewingamicrocontroller'smemorycontentsandoptionsettings
ToviewaSTmicrocontroller'smemorycontentsandoptionsettings:
1. MakesurethattheSTmicrocontrollerispluggedintotheprogrammingsocket
2. MakesurethatSTVPiscorrectlyconfiguredfortheconnectedSTmicrocontrollerbyfollowingtheinstructionsgiveninConfiguringSTVisualProgrammer.
3. ToviewtheSTmicrocontroller'sProgrammemory,DatamemoryandOptionbytecontents,clickAlltabsintheReadmenu(orpressthebutton).Youcannowviewthereadinformationbyclickingonthe
appropriatetabatthebottomofthemainwindow.4. ToviewtheSTmicrocontroller'sProgrammemory,Datamemoryor
Optionbytecontentsindividually:a. Clicktheappropriatetabatthebottomofthemainwindow.b. ClickonCurrentintheReadmenu(orpressthe button).
5. ToviewaselectedareaoftheSTmicrocontroller'sEPROM,FLASHorEEPROM:a. Clicktheappropriatetabatthebottomofthemainwindow.b. ClickonAddressRange...intheReadmenu(orpressthe
button).TheAddressRangedialogboxopens.c. Selecttheareayouwanttovieweitherbyselectingitfromthe
Validaddressrangesarelist,orenteringitsstartandendaddressesintheStart@andEnd@fields.
d. ClickonOK.6. ToviewselectedsectorsofFLASHmemoryclicktheProgram
Memorytab,thenclickonActivesector(s)intheReadmenu(orpressthe button).ThememorycontentsarenowreadanddisplayedintheDisplayarea.TIP:PresstheESCkeytoabortthereadingdeviceprocess.
Verifyingamicrocontroller'smemorycontentsandoptionsettings
VerifyingaSTmicrocontroller'smemoryandoptionsettingsmeanscheckingthatitsProgrammemory,DatamemoryandOptionbytesettingsarethesameasthosedisplayedintheSTVPDisplayarea.ToverifyaSTmicrocontroller'smemoryandoptionsettings:
1. MakesurethattheSTmicrocontrollerispluggedintotheprogrammingsocket.
2. MakesurethatSTVPiscorrectlyconfiguredfortheSTmicrocontrollerbyfollowingtheinstructionsgiveninConfiguringSTVisualProgrammer.
3. MakesurethefileyouwanttoverifyisloadedintheSTVPmainwindow.
4. Toverifyallmemorycontents,clickonAlltabsintheVerifymenu(orpressthe button).
5. Toverifyanindividualmemoryareaclicktheappropriatetabatthebottomofthemainwindow,thenclickonCurrenttabintheVerifymenu(orpressthe button).
ToverifyaselectedareaoftheSTmicrocontroller'smemoryclicktheappropriatetabatthebottomofthemainwindow,thenclickonAddressRange...intheVerifymenu(orpressthe button).
ToverifyselectedsectorsofFLASHmemoryclicktheappropriatetabatthebottomofthemainwindow,thenclickonActivesector(s)intheVerifymenu(orpressthe button).
AnydiscrepanciesarereportedintheOutputwindow.TIP:PresstheESCkeytoabortverifyingdeviceprocess.
HowtorestoredefaultRCCalibrationvalues
ThisfeatureispresentoncertainSTdeviceshavinganInternalRCoscillatorasclockselection.RCCalibrationvaluesareusedtogetagoodfrequencyaccuracyoninternalRCoscillator.SomeSTdeviceshavethedefaultRCCalibrationvaluesfactoryprogrammedintheSTMcu'sProgramandDatamemory.RestoringthedefaultRCCalibrationvaluesintheSTMcu'sProgramandDatamemorycanbedonebyenablingandthendisablingRead-OutProtection.IfRead-OutProtectionisalreadydisabled,setittoONintheoptionbytesettingsandprogramtheoptionbyte.ThensetRead-OutProtectionbacktoOFFandreprogramtheoptionbyte.ThedefaultRCCalibrationvaluesarethenautomaticallywrittentotheappropriateaddressesinProgramandDatamemory.Note:Thisfeatureisworkingonlyinspecificprogrammingmodes:"Socket"or"ICPOPTDisable".RefertoyourSTxxxxDatasheetforthedefaultvaluesandaddresses.CAUTION:AnyProgramorDataintheSTMcumemoryarelostwhenRead-OutProtectionisdisabled.
Openinganexecutablefile
Beforeopeningafile,youneedtoselectthecorrespondingmemoryareatobeloadedwithdatafilecontent.Forinstance,toopenaprogrammemoryarea:
1. IntheSTVPmainwindow,clickonthePROGRAMMEMORYtab.2. ClickonOpenintheFilemenu(orpressthe button).TheOpen
dialogboxappears.
3. Browsetowhereyouhavesavedthefileholdingthedatayouwant
toprogram,andthenselectit.4. ClickonOpen.Whenthefileisloaded,theOutputareadisplaysthe
filechecksum.ThefilechecksumforeachfileloadedandthememorychecksumforeachareaaredisplayedintheDeviceStatuswindow.
5. Toopenothermemoryareadatafiles,repeatsteps1to4,selectingtheappropriatememoryareatabforeachdatafile(DATAMEMORYorOPTIONBYTE)instep1.TIP:ThenamesofthelastopenedfilesaredisplayedatthebottomoftheFilemenu.Toopenoneofthesefiles,clickonitsname.
Editinganexecutablefile
OpenthefileyouwanttoeditbyfollowingtheinstructionsgiveninOpenafile.Youcannowmodifytheprogrammemorycontents,datamemorycontentsortheOptionbytesettings.Tomodifytheprogrammemorycontentsordatamemorycontents:
1. Clickontheappropriatetabatthebottomofthedisplayarea.2. Overtypeeitheranyhexadecimalvaluesyouwanttochangeorany
visibleASCIIcharactersyouwanttochangeinthedisplayarea.ASCIIcharactersareautomaticallyupdatedwhenyouchangehexadecimalcharacters,andthesamevice-versa.TomodifytheOptionbytesettings:
1. ClickontheOptionstabatthebottomofthemainwindow.2. Theavailableoptionsarelistedinthelefthandcolumnwiththeir
valuedescriptionsintherighthandcolumn.3. SToptionbitshaveonlytwostates:0,1.Unprogrammedstatecould
be0or1dependingonthedevice.Tochangethestatusofanoption,clickontheoptionnameoritscurrentsetting.Clickonthe()buttonwhichappearsbesidetheoptiontodisplayadropdown
menufromwhichyoucanselectanewsetting.NOTE:MakesureyousaveyourchangesbeforeexitingSTVPbyclickingonSaveintheFilemenu(orpressingthe button).
Writingapatterntoaselectedmemoryarea
Towriteapatterninaselectedmemoryareaproceedasfollows:
1. ClickonFillarea...intheEditmenu(orpressthe button).TheChoosearea&valuedialogboxisdisplayed.
2. IntheFillwithfield,enterthedatayouwanttofilltheareawith.3. UndertheFillAreasection,proceedasfollows:
Tofilltheentireprogramspace,selectWholeaddressspace.
Tofillaselectedarea,selectSubrange:.EitherenterthestartandendaddressesoftheareatofillintheStart@andEnd@fieldsrespectively,orselectanaddressrangefromtheValidrangesarefield.
4. ClickonOK.Iftheaddressrangeisvalid,STVPfillsthespecifiedaddressspacewiththespecifiedfillvalue.NOTE:MakesureyousaveyourchangesbeforeexitingSTVPbyclickingonSaveintheFilemenu(orpressingthe button).
Savinganexecutablefile
ClickonSaveintheFilemenu(orpressthe button).Withthiscommand,youcancreateafileintheMotorolaortheIntelformatforaproject.TIP:YoucanalsosaveafileunderanewnamebyclickingonSaveAs...ontheFilemenu.
ExecutingafileinRAM
ToexecuteafileinRAM:
1. ClickonRAMExecintheFilemenu(orpressthe button).TheOpendialogboxappears.
2. Inthedrivelist,clickthedrivethatcontainsthefileholdingthedatayouwanttoexecute.
3. Intheboxbeneaththedrivelist,double-clickthenameofthefolderthatcontainsthefileyouwanttoexecute.Continuedouble-clickingsubfoldersuntilyouopenthesubfolderthatcontainsthefile.
4. Inthelistoffiles,clickthefileyouwanttoexecute.5. ClickonOpen.Whenthefileisexecuted,theOutputareadisplaysa
message.
Whatisaproject?
AprojectisawaytoautomaticallyconfigureSTVPeachtimeyourunit.AprojectexistsonlyinafileformatthatcontainsSTVPcommands.Thisallowsyoutosetupaprogrammingenvironmentandtodefineprogrammingproceduresbyopeningtheprojectfile.
Aprogrammingenvironmentmustorcouldinclude:TheprogramminghardwareusedtoprogramtheSTmicrocontroller(EPB,DVP,STICK,etc.).Thisinformationisamandatorypartoftheprojectdefinition.
ThePCportthattheprogramminghardwareisconnectedto(mandatory).
TheProgrammingmodeused(mandatory).TheSTmicrocontrollertobeprogrammed(mandatory).Theprogramfilethatcontainstheprogramtobeprogrammed.Thedatafilethatcontainsthedatatobeprogrammed.TheOptionBytefilethatcontainstheOptionBytesettingstobeprogrammed.
Programmingprocedurescouldincludethefollowingactions:Eraseallbeforeprogramming(FLASHmemorydeviceonly).Blankcheckbeforeprogramming.Verifyafterprogramming.Unlockprotectionbeforeaprogrammingcycle.Promptfornewprogrammingcycle.Generateandwriteserialnumbering.
Oncetheprojectfileisopen:toprogramadevice,clickonAlltabsintheProgrammenu.
Createaproject
Beforecreatingaproject,youmustreadWhatisaproject?Tocreateaproject:
1. ClickonNewintheProjectmenu.TheCreateNewProjectdialogboxopens.
2. Inthedrivelist,clickthedriveonwhichyouwanttocreatethenewprojectfile.
3. Intheboxbeneaththedrivelist,double-clickthenameofthefolderinwhichyouwanttocreatethenewprojectfile.Continuedouble-clickingsubfoldersuntilyouopenthesubfolderinwhichyouwanttocreatethefile.
4. TypetheprojectfilenameintheFilenamebox.5. ClickonSave.6. Theprojectisnowcreated(theprojectfilenameextensionis.stp).
Thenameoftheprojectappearsinthewindowtitlebar:
NOTE:Whenyoucreateaproject,itinheritsthecurrentconfiguration.Thisconfigurationcanbemodifiedbeforeclosingtheproject.Closingaprojectsavesitautomatically.
Openaproject
STVPprojectfileshavethefileextension.stp.Toopenaproject:
1. ClickonOpenintheProjectmenu.TheOpenExistingProjectdialogboxopens.
2. Inthedrivelist,clickthedrivethatcontainsthefile.3. Intheboxbeneaththedrivelist,double-clickthenameofthefolder
thatcontainsthefile.Continuedouble-clickingsubfoldersuntilyouopenthesubfolderthatcontainsthefile.
4. Inthelistoffiles,clicktheprojectfilenametoopen(onlyfileswith.stpextensionaredisplayed).
5. ClickonOpen.Theprojectnameappearsinthewindowtitlebar:
Atthisstage,theprogrammingenvironmentissetupandalldatafilesareopened.NOTE:Oncetheprojectfileisopen:toprogramadevice,clickonAllintheProgrammenu(orpressthe button).TIPS:ThenamesofthelastopenedprojectsaredisplayedatthebottomoftheProjectmenu.Toopenoneoftheseprojects,clickonitsname.
YoucanalsosetupashortcuttoSTVPwhereaspecificprojectisopenedautomatically.JustcreateashortcutonyourWindowsdesktoptoSTVP,right-clicktheshortcuticonandselectProperties.IntheShortcuttabofthePropertieswindow,edittheTargetlinebyadding-project=project_name.stptotheendofthecommandline.Forexample,toopenmy_project.stpautomatically,theTargetfieldmightlooklike:C:\ProgramFiles\stvp\stvp.exe-project=my_project.stp
Editingaproject
First,openaproject.
1. ClickonEditintheProjectmenu.2. TheProjectEditionwindowopens.BelowisanexampleofaProject
Editionwindowwithtwotypesofmemoryarea(PROGRAMMEMORYandOptionBYTE)forthechip:
3. MakeanynecessarymodificationstothedifferenttabsoftheProject
Editionwindow:Configuration,Properties,SerialNumberingandapplicablememoryareatabs(ProgramMemory,DataMemoryorOptionByte).
4. ClickonOKtoexittheProjectEditionwindowandtosaveyourchanges.
Settingaprojecthardwareenvironment
Aprojecthardwareenvironmentdefines:TheprogramminghardwareusedtoprogramtheSTmicrocontroller(EPB,DVP,STICK,etc).
ThePCportthattheprogramminghardwareisconnectedto.Theprogrammingmodetobeused.TheSTmicrocontrollertobeprogrammed.
Tosetaprojecthardwareenvironment:
1. ClickonConfigureSTVisualProgrammerfromtheConfiguremenu(orpressthe button).TheConfigurationdialogboxopens:
2. FromtheHardwarelist,selecttheoneyouareusing(EPB,DVPorSTICK).
3. FromthePortlist,selectthePCportfromwhichSTVPisconnected.4. FromtheProgramingmodelist,selecttheprogrammingmodeyou
wanttouse.5. FromtheDevicelist,selecttheSTmicrocontrolleryouwantto
program.6. ClickOKtosaveyourchangesandclosethedialogbox.
TIP:YoucanalsoselectaSTmicrocontrollerfromthedrop-downlistinthemainwindowtoolbar.
SettingEPROM,FLASH,EEPROMorOptionfilesinyourproject
Datafilescontaindatatoprogramintomemory.Settingdatafilesinaprojectfile(.stpextension),enablesthesedatafilestobeloadedautomaticallyeachtimeaprojectfileisopen.Tosetdatafilesinaproject:
1. ClickonEditintheProjectmenu.TheProjectEditionwindowopensasfollows:
NOTE:thisisaProjectEditionwindowwithtwotypesofmemoryarea(optionbyteandprogrammemory)forthedevice.
2. Clickonamemorytab(DATAMEMORY,PROGRAMMEMORYorOPTIONBYTE)andthenclickonAdd.
3. TheOpendialogboxisdisplayed.4. Findandselectthefileyouwanttosettotheprojectandclickon
Open.Thefileissettotheproject-itspathnameandotherattributesaredisplayedintheProjectEditionwindow.
NOTE:thisisaProjectEditionwindowwithtwotypesofmemoryarea(datamemoryandprogrammemory)forthedevice.
5. ClickonOKtosaveyourchangesandclosetheProjectEditionwindow.
6. Repeatsteps2to5ifyouwanttosetfilesfortheDATAMEMORY,PROGRAMMEMORYorOPTIONBYTEmemoryareas.
Settingupautomaticprogrammingprocedures
Automaticprogrammingproceduresallowyoutoaccomplishthefollowingactions:Blankcheckbeforeprogramming.Verifyafterprogramming.Clearmemorybeforeloadingafile.Erasedevicememorybeforeprogramming.Displayapopupwindowwhenanerroroccurs.Logactivity.UnlockprotectionbeforeaprogrammingcyclePromptfornewprogrammingcycle.Activateusermodeonnextprojectloading.
Tosetupautomaticprogrammingprocedures:
1. ClickonEditintheProjectmenu.TheProjectEditionwindowopens.
2. ClickonthePropertiestab.ThePropertiesdialogboxopensasshownbelow(thisisaProjectEditionwindowwithtwotypesofmemoryareas(optionbyteandprogrammemory)forthedevice.)
3. ChecktheProgrammingOptionboxesyouwanttoperform.
Blankcheckbeforeprogramming(whenavailable):ThisoptionisonlyavailablewithFLASHdevices.
VerifyafterprogrammingClearmemorybeforeloadingafile:CheckingthisoptionwillcleartheexistingmemoryvaluesinyourSTVPsessionwhenloadinganewfile.Ifyoudonotcheckthisoption,eachtimeyouloadanewfile,onlythosememoryvaluesalsopresentinthenewlyloadedfilewillbeoverwritten.
Erasedevicememorybeforeprogramming(whenavailable):ThisoptionisonlyavailablewithFLASHdevices.
DisplayapopupwindowwhenanerroroccursLogactivityUnlockprotectionbeforeaprogrammingcycle:Thisoptionisonlyavailableifaprojectfileisopenandoncertaindevices.Clickthisoptionifyouwanttounlocktheprotectionatthebegginingofacycletobeabletoreprogramthedeviceifitwasprotectedbeforeexecutingtheproject.
Promptfornewprogrammingcycle:Thisoptionisonlyavailableifaprojectfileisopen.Clickthisoptionifyouwanttorepeatthesameprogrammingprocedureforseveralmicrocontrollers.Whenthisoptionischecked,adialogboxwillappearattheendofeachprogrammingcycle,askingyouifyouwishtoperformthesameprogrammingcycleagain.
Activatesecuremodeonnextprojectloading:Thisoptionisonlyavailableifaprojectfileisopen.Checkingthisoptiononlyallowstheprogrammingsessionsavedintheprojectfiletobeperformedwhiletheprojectisopen.Thisoptionisusefulifyouwantaspecificprogrammingsessiontobeusedrepeatedlywithouttampering.Onceapplied,thisoptioncanberemovedfromtheProjectEditionwindow,Propertiestab,accessiblebyselectingProject>Editfromthemainmenu.
4. ClickonOKtosaveyourchangesandclosetheProjectEditionwindow.
Settingupautomaticserialnumbering
STVPcanautomaticallygenerateandwriteserialnumbersintothememoryofSTmicrocontrollers.Youdefineautomaticserialnumberingbyspecifying:thememoryaddresswheretoprogramit,thelength(inbyte),thestartingvalue,thestepincrementvalue.
NOTE1:Eachtimeyouleaveaproject,thecurrentserialnumbervalueissaved.Itwillbereloadedduringthenextprojectopening.Tosetupautomaticserialnumbering:
1. ClickonEditintheProjectmenu.TheProjectEditionwindowopens.
2. ClickontheSerialNumberingtab.TheSerialNumberingdialogboxopens:
NOTE:ThisisaProjectEditionwindowwithtwotypesofmemoryareas(datamemoryandprogrammemory)inthedevice
3. ChecktheEnableSerialNumberingbox.4. IntheStartAddress(Hex)field,enterthestartaddresswhereto
writetheserialnumber.
5. IntheLength(inbyte)field,selectthenumberofbytes(1,2,4or8)oftheserialnumber.
6. IntheBaseValue(Hex)field,enterthestartingvaluefortheserialnumber.
7. IntheStep(Hex)field,enterthestepincrementvaluetoapplytotheserialnumber.
8. ClickonOKtosaveyourchangesandclosetheProjectEditionwindow.
Executingaprojectprogrammingcycle
Ifyouhavedefinedaproject,youcanexecuteablankcheck,programallthememoryareasthathaveassociatedfilesinonego,andverifythatallareashavebeencorrectlyprogrammed.Therearetwowaysofdoingthis
1. Manually,byusingthefunctionsavailableunderthemenubarToperformablankcheck:Withthedefinedprojectalreadyopen,clickonCurrenttaborActiveSector(s)intheBlank-Checkmenu.
Toprogramallthememoryareaswhosecorrespondingfilesareloaded:Withthedefinedprojectalreadyopen,clickonAlltabsintheProgrammenu(orpressthe button).
Toverifyallprogrammedareas:Withthedefinedprojectalreadyopen,clickonAlltabsintheVerifymenu(orpressthe button).
2. Automatically,byusingtheautomaticprogrammingprocedure.Refertothedocumentationprovidedwiththeprogrammingdeviceyouareusingforfurtherdetailsabouthowtheblankcheck,programandverifyareexecuted.
Troubleshooting
WhenItrytoreadorwritetotheSTmicrocontrollerthemessage"Cannotcommunicatewiththedevice"isdisplayed:CheckthattheporttowhichtheprogrammingdeviceisconnectediscorrectlyconfiguredinSTVP.
Note:IfyouusetheLPTport,youmustconfigurethisportusingCentronics,EPP,ECPorbidirectionalmodesonly.WithWindows®NT®,2000®andXP®,thePARSTMdrivermustbeinstalled.CheckthatSTVPiscorrectlyconfiguredfortheprogrammingdeviceinuse.
CheckthattheSTmicrocontrollerforwhichSTVPisconfiguredisthesameasthatwhichispluggedintotheprogrammingdevice.RefertoConfiguringSTVisualProgrammerforfurtherinformation.
WhenItrytoread,program,verifyorblankcheckaSTmicrocontroller,themessage"...failedataddressXXXX"isdisplayed:CheckthatthecorrectdeviceispluggedintothesocketorthatSTVPiscorrectlyconfiguredforthedeviceinuse.
Checkthatthedeviceisn'tdefective(changethedevice).
WhenIopenaprojectfile,themessage"Datafilenotfound"isdisplayed:Checkthatdatafilesassociatedwiththeprojectfileexistorthatdatafileshavenotbeenmoved
WhenusingtheSTICK,themessage“PCparallelportcablenotconnected”isdisplayed:MostcommunicationfailuresbetweenthehostPCrunningSTVPandtheSTICKinterfaceboardstemfromproblemsintheparallelportconnection.Topreventcommunicationproblems,whensettingupyourparallelportconnection,ensurethat:YouusetheparallelcableprovidedwithyourSTICK—usingalongerparallelcablemaycausemalfunctions.
ConnectthecabledirectlybetweenthehostPCandSTICKinterfaceboard—theinsertionofadditionalcablesorswitchboxesbetweenthehostPCandtheinterfaceboardmaycausemalfunctions.
Youremoveanyparallelportdongles.EnsureLPT1addressisintherange03BC-03BFor0378-037For0278-027F.
Ensurethat“printerportLPT1”isnotdisabledinyourPC.Forexample,intheIBM®ThinkPad,youcanselect“infraredprinting(LPT)porton”.
WhenusingtheSTICK,themessage“Problemonsupplyvoltages”isdisplayed:WhenyouhavesupplyvoltageproblemsthegreenLEDwillnotcomeon.Tofindthecauseoftheproblem:CheckthattheAC/DCpowersupplyadaptorisfirmlyconnectedtoboththemainpowersupplyandtotheSTICKinterfaceboard.Tocheckthatthemainpowersupplyison,disconnectICCcableandmeasurethevoltageattestpin2atlocationTP1.ThispinshouldhaveunregulatedDCvalueintherange18Vto21V.(GroundisonTP1pin1whichhasawhitedotmark.)
CheckthattheW1jumperissetononeofthethreepositionsoutlinedintheSTICKUserManual.Ifitissetonthe“VDD”position,checkthattheICCcableisconnectedproperlyandthatyourapplication’sVDDisconnectedtoICCconnectorpin7.YourapplicationVDDmustbeintherange2.4Vto5V.Ontestpin4atlocationTP1,youmusthavethesamevoltagevaluethatyouselectedwiththeW1jumper.
Checkthatthereis5Vontestpin3atlocationTP1.Ifyouhavemadeallofthesechecksandyoustillgetthe“Problemonsupplyvoltages”message,contactyourSTdistributororsalesofficeinordertohaveyourSTICKrepaired.
WhenusingtheSTICK,themessage“Cannotcommunicatewiththedevice”isdisplayed:Checkthat:TheICCcableiswellconnected.YouhaveselectedtherightST7device.TheICCsignalsareclearandwithinthefollowingranges:
ICCDATA:Thisapplicationsignalmustnotdrivemorethan1mA.ICCCLK:Thisapplicationmustnotdrivemorethan1mA.ICCRESET:Thisapplicationmustnotdrivemorethan5mA.ICCSEL_VPP:Thepull-downresistormustnotbelowerthan10kOhm.
YouhaveselectedtherightprogrammingmodeinthemainmenuConfigurewindow>programmingmodelist.Rememberthatifyouuse:ICPOPTEnablemode,checkthatyourapplicationclockcircuitrydoesmatchtheCLOCKSOURCEandOSCTYPEoptionsalreadyprogrammedinST7Flashmicrocontrolleroptionbyte.Fordevicesoutoffactoryyouhavetocheckthesevaluesindatasheet.Ifyoudon’tknowthesevaluesyouhavetoselectICPOPTDisable.
ICPOPTDisablemode,ensurethatexternalsourceclockisasquarewavesignalfrom0VtoVDD.Ifnot,youhavetoconnectICCOSCsafeclock(ICCconnectorpin9)totheOSC1pinoftheST7Flashmicrocontrollerinyourapplication.
Otherfrequentlyaskedquestions:HowcanIfindoutwhichSTVPandHardwareconfigurationfileversionsI'musing?
Programmingmode
SocketprogrammingmodeisusedwhenputtingthedeviceintheEPB/DVPsockets.Takecaretoplaceonlyonedeviceifthereareseveralsockets.Thearrowindicatespin1ofthedeviceontheEPB/DVPsockets.IftheEPB/DVPsupportalsoISPorICPprogrammingmode,removetheflatcableprovidedwiththeboardfromtheISPorICPconnectortouseSocketprogrammingmode.ISP/ICPprogrammingmodesareusedwhenyouhavesolderedyourdeviceonyourapplicationboardandyouwanttoaccessthedeviceafterwards.ISPstandsforInSituProgramming,itisworkingwithST72C254xx/ST72C334xx/ST72C171xxandST72C411xxdevicesonly.RefertotheDatasheetofthedeviceformoredetailsonISPconnectorandISPprogramming.TakecaretoremovethedevicesthatareinthesocketoftheEPB/DVPbeforeusingtheISPprogrammingmode.ICPstandsforInCircuitProgramming,itisworkingwiththelatestFlashdevices(XFlashorHDFlash).RefertothedatasheetofthedeviceformoredetailsonICPconnectorandInCircuitProgramming.TakecaretoremovethedevicesthatareinthesocketoftheEPB/DVPbeforeusingtheICPprogrammingmode.BeforeselectingtheProgrammingmodeyouhavetochecktheoptionbytedescriptioninyourSTFlashmicrocontrollerDatasheetandalsowhethertheSTisex-factoryornot.Ex-factorydevicesarebrandnewdeviceswithfactorydefaultoptionsprogrammed.ICPOPTDisable:ThisprogrammingmodeisICPmodewithOptionBytesDisabled.Thismeansthatthesettingorstateofthedevice'soptionbyteshavenoeffectinapplication,whichtheexceptionofRead-outProtection.Theclockconfigurationisforcedto"ExternalSource"andifyourST7Flashapplicationclockisnotasquarewavefrom0vtoVDD(i.e.ifyouusetheinternalRCoscillatoroftheST7FlashMicrocontrollerorifyouhavearesonatororanexternalRC
oscillatorontheOSC1/OSC2pins),youhavetoconnecttheclockICCOSCfromtheICCconnectortotheOSC1pinoftheST7Flashmicrocontrollerinyourapplication.Thisprogrammingmodeisasafemode.ItmustbeusedwhentheICPOPTEnableconfigurationdoesnotwork.Thiscanbethecaseifyourapplicationclockcircuitrydoesn’tmatchthepreviouslyprogrammedclocksourceorosctypeoptionbyteselection.ICPOPTEnable:ThisprogrammingmodeisICPmodewithOptionBytesEnabled.ThismeansthattheoptionbytesoftheST7deviceintheapplicationareactivatedwiththeirprogrammedvalues.TheRead-outProtectionandtheClockConfiguration(OSCType,OSCRange,PLL)areEnabled,theWatchdogisforcedtoSoftwareduringcommunication.ThisprogrammingmodehastobeselectediftheST7Flashishasthefactorydefaultsettingsorifyourapplicationclockcircuitrymatchesthepreviouslyprogrammedclocksourceorosctypeoptionbyteselection.InthisProgrammingmode,theICCOSCclockfromtheICCconnectorisnotneeded.ICP:ThisprogrammingmodeisthesameasICPOPTEnable,theOptionBytesare'Enabled'andtheWatchdogisforcedtoSoftwareduringcommunication.Normally,thismodeistheonlychoiceforthatdevicebecausethereisnoclockconfiguration,atleastaresonatormustbeusedwiththatST7device.So,theICCOSCclockfromtheICCconnectormustnotbeconnectedtotheapplication.RefertothelatestErratasheetofthedevicetogetextrausefulinformation.
Chooseaddress
WhenyouselectGoto...fromtheEditmenu,theChooseAddressdialogboxappears:
1. EntertheaddressyouwanttojumptointheJumptofield.2. ChooseSetcursorinHEXAareaifyouwantthecursortoappear
intheHexadecimalvieworSetcursorinASCIIareaifyouwantthecursortoappearintheASCIIview.
3. ClickonOK.Iftheaddressisvalid,STVPplacesthecursoratthespecifiedaddressinthedisplayarea.NOTE:Usebackspacetocleartheinputarea.
Searchbytes
WhenyouselectSearch...fromtheEditmenu,theSearchbytesdialogboxappears:
1. Clicktochooseinwhichview(HexadecimalorASCII)youwanttosearchthebytes.
2. Enterthebytesyouwanttofindintheinputarea.3. ClickFindnexttobeginthesearch.Ifthesearchissuccessful,
STVPplacesthecursoronthefoundoccurrenceinthedisplayarea.
Propertieswindow
WhenyouselectPreferencesfromtheEditmenu,thePropertieswindowappears.Note:ThesesameprogrammingoptionsappearinthePropertiestaboftheProjectEditionwindow,whichappearswhenyoucreateoreditaproject.Clickonapropertycheckboxtoturnon/offthatproperty.ClickonOKtosavesettingsandexitthewindow.
ChecktheProgrammingOptionboxesyouwanttoperform.
Blankcheckbeforeprogramming(whenavailable):ThisoptionisonlyavailablewithFLASHdevices.
VerifyafterprogrammingClearmemorybeforeloadingafile:CheckingthisoptionwillcleartheexistingmemoryvaluesinyourSTVPsessionwhenloadinganewfile.Ifyoudonotcheckthisoption,eachtimeyouloadanewfile,onlythosememoryvaluesalsopresentinthenewlyloadedfilewillbeoverwritten.
Erasedevicememorybeforeprogramming(whenavailable):ThisoptionisonlyavailablewithFLASHdevices.
Displayapopupwindowwhenanerroroccurs
LogactivityUnlockprotectionbeforeaprogrammingcycle:Thisoptionisonlyavailableifaprojectfileisopenandoncertaindevices.Clickthisoptionifyouwanttounlocktheprotectionatthebeginningofacycletobeabletoreprogramthedeviceifitwasprotectedbeforeexecutingtheproject.
Promptfornewprogrammingcycle:Thisoptionisonlyavailableifaprojectfileisopen.Clickthisoptionifyouwanttorepeatthesameprogrammingprocedureforseveralmicrocontrollers.Whenthisoptionischecked,adialogboxwillappearattheendofeachprogrammingcycle,askingyouifyouwishtoperformthesameprogrammingcycleagain.
Activatesecuremodeonnextprojectloading:Thisoptionisonlyavailableifaprojectfileisopen.Checkingthisoptiononlyallowstheprogrammingsessionsavedintheprojectfiletobeperformedwhiletheprojectisopen.Thisoptionisusefulifyouwantaspecificprogrammingsessiontobeusedrepeatedlywithouttampering.Onceapplied,thisoptioncanberemovedfromtheProjectEditionwindow,Propertiestab,accessiblebyselectingProject>Editfromthemainmenu.
NOTE1:The'Unlockprotectionbeforeaprogrammingcycle','Promptfornewprogrammingcycle'and'Activateusermodeonnextprojectloading'optionsareonlyavailablewhenaprojectisopened.NOTE2:ClickonBrowsetocreateorselectalogfile.ThelogfilenameisdisplayedinthebottomlefthandcornerofthePropertieswindow.
Readactivesectors
1. ClickFlashSectorfromtheViewmenutodisplaytheFlashsectorareaifnotalreadydisplayed.
2. Selectthesectorsyouwanttoreadfrombyclickingontheirrespectivecheckboxes
3. ClickActiveSector(s)fromtheReadmenu.
Readaddressrange
WhenyouselectAddressRange...fromtheReadmenu,theAddressrangedialogboxappears:
1. ChoosetheareayouwanttoreadfromeitherbyselectingitfromtheValidaddressrangesarelist,orenteringitsstartandendaddressesintheStart@andEnd@fields.
2. ClickonOK.Iftheaddressrangeisvalid,STVPreadsfromtheSTmicrocontrolleranddisplaysthecontentsoftheselectedmemoryareafromtheselectedmemorytab.NOTE:Usebackspacetocleartheinputareas.
Programactivesectors
1. ClickonFlashSectorfromtheViewmenutodisplaytheFlashsectorareaifnotalreadydisplayed.
2. Selectthesectorsyouwanttoblank-checkbyclickingontheirrespectivecheckboxes
3. ClickonActiveSector(s)fromtheProgrammenu.
Programaddressrange
WhenyouselectAddressRange...fromtheProgrammenu,theAddressrangedialogboxappears:
1. ChoosetheareayouwanttoprogrameitherbyselectingitfromtheValidaddressrangesarelist,orenteringitsstartandendaddressesintheStart@andEnd@fields.
2. ClickonOK.Iftheaddressrangeisvalid,STVPwritestotheSTmicrocontrollerthecontentsoftheselectedmemoryareafromthecurrentmemorytab.NOTE:Usebackspacetocleartheinputareas.
Verifyactivesectors
1. ClickFlashSectorfromtheViewmenutodisplaytheFlashsectorareaifnotalreadydisplayed.
2. Selectthesectorsyouwanttoverifybyclickingontheirrespectivecheckboxes
3. ClickActiveSector(s)fromtheVerifymenu.
Verifyaddressrange
WhenyouselectAddressRange...fromtheVerifymenu,theAddressrangedialogboxappears:
1. ChoosetheareayouwanttoverifyeitherbyselectingitfromtheValidaddressrangesare:list,orenteringitsstartandendaddressesintheStart@andEnd@fields.
2. ClickonOK.Iftheaddressrangeisvalid,STVPchecksthatdatadisplayedintheselectedmemoryareaisidenticaltothecorrespondingSTmicrocontrollermemory.NOTE:Usebackspacetocleartheinputareas.
Eraseactivesectors
1. ClickonFlashSectorfromtheViewmenutodisplaytheFlashsectorareaifnotalreadydisplayed.
2. Selectthesectorsyouwanttoerasebyclickingontheirrespectivecheckboxes
3. ClickonActiveSector(s)fromtheErasemenu.
Blank-Checkactivesectors
1. ClickFlashSectorfromtheViewmenutodisplaytheFlashsectorareaifnotalreadydisplayed.
2. Selectthesectorsyouwanttobeblank-checkedbyclickingontheirrespectivecheckboxes
3. ClickActiveSector(s)fromtheBlank-Checkmenu.
About...
ThiswindowdescribesgeneralinformationconcerningSTVP.Init,youcanfind:theversionnumberofSTVP,theversionnumberofconfigurationfiles(HardwareConfigurationandTargetConfiguration),
byselectingModulesintheInformationcombobox,youcanreadtheversionnumbersofSTVP'sDLLsandthePARSTMdriver.TheDLLinformationwillappearintheinformationarea.
Atypicalprogrammingsession-configuringSTVP
1. IntheConfiguremenu,clickConfigureSTVisualProgrammer(orpressthe button).TheConfigurationdialogboxopens.
2. FromtheHardwarelist,selectthehardwareyouareusing.3. FromthePortlist,selecttheparallelportonthehostPCtowhich
theEPBorDVPisconnected.Onlytheportsthatarecompatiblewiththeselectedhardwarearelisted.
4. FromtheProgrammingmodelist,selecttheprogrammingmodeyouwanttouse.
5. FromtheDevicelist,selecttheSTmicrocontrolleryouwanttoprogram.
6. ClickOKtosaveyourchangesandclosethedialogbox.TIP:YoucanalsoselectaSTmicrocontrollertypefromthedrop-downlistinthetoolbar.
Filechecksum
Thischecksumisdoneonalldatapresentinadatafile.ThiscouldincludedataonanonexistingmemoryareaofaSTmicrocontroller(forexample:EPROMsplitintwoareas).Thefilechecksumoperationisperformedsimplybycalculatingthesumofallofthefile'sdatabytes,givingauniquesignatureforeachfile.TheDeviceStatuswindowshowsforalldifferentareas,allthefilesloadedwiththeirfilechecksums.NOTE:onedatafileisneededpermemoryarea(EPROM,FLASH,EEPROMandOptionByte).
Memorychecksum
Thischecksumisdoneondeviceexistingmemoryarea.Eachexistingmemoryarea(EPROM,FLASHandEEPROM)hasitsowndevicechecksum.Eachchecksumoperationisperformedsimplybycalculatingthesumofeachdevicetabdatabytes,givingauniquesignatureforeachmemorytype.TheDeviceStatuswindowshowsallmemorychecksumsforallmemorytypes.
BlankCheck
YoucanperformablankcheckontheEPROMorFLASHmemoryarea.Whenyouperformablankcheck,youcheckthattheSTmicrocontroller'sEPROMorFLASHhasnotbeenwritten.ThisisausefulwayofverifyingthataSTmicrocontrollerhasnotalreadybeenprogrammed.
Verify
STVPcancheckthatthecodewrittentotheSTmicrocontrollerEPROM,FLASH,EEPROMorOptionsByteareconsistentwiththatstoredinthefileswhosecontentswereused.
Erase
YoucanperformanautomaticeraseonaFLASHmemoryarea.ThisisthewaytoeraseallinformationinaFLASHmemoryareabeforeprogramming.