CodeWarrior for HC12 V4.7 debug via cyclone PRO, can't program the flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CodeWarrior for HC12 V4.7 debug via cyclone PRO, can't program the flash

3,343 Views
Destinio
Contributor I
I created a project with the template, when I clicked debug menu
the debugger responsed with a relay jump, but it can't download the program,
the leds didn't react at all.  below is the command window,
finnally it pop the dialog "Error while writing to FFFE ...101FE" and halt there.Can any one help me?
 
 
executing C_layout.hwl
!OPEN source 0 0 60 39
NO CONNECTION
!Source < attributes TOOLTIP on,TOOLTIP_FORMAT signed,TOOLTIP_MODE details,FREEZE off,MARKS off
!OPEN assembly 60 0 40 31
!Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,FORMAT Auto,FREEZE off,TOPPC 0x30B1D3
!OPEN procedure 0 39 60 17
!Procedure < attributes VALUES on,TYPES off
!OPEN register 60 31 40 25
!Register < attributes FORMAT AUTO,COMPLEMENT None
!OPEN memory 60 56 40 22
!Memory < attributes FORMAT hex,COMPLEMENT None,WORD 1,ASC on,ADR on,MODE automatic,UPDATERATE 10,ADDRESS 0x80
!OPEN data 0 56 60 22
!Data:1 < attributes SCOPE global,COMPLEMENT None,FORMAT Symb,MODE automatic,SORT NotSort,UPDATERATE 10,NAMEWIDTH 16
!OPEN data 0 78 60 22
!Data:2 < attributes SCOPE local,COMPLEMENT None,FORMAT Symb,MODE automatic,SORT NotSort,UPDATERATE 10,NAMEWIDTH 16
!OPEN command 60 78 40 22
!Command < attributes CACHESIZE 1000
!bckcolor 50331647
!font 'Courier New' 9 BLACK
!AUTOSIZE on
!ACTIVATE "Data:2" "Command" "Procedure" "Data:1" "Source" "Register" "Assembly" "Memory"
done C_layout.hwl
Loading Target ...
SETCOMM DRIVER NOPROTOCOL NOPERIODICAL ""
SETCOMM COMPORT NONE
IO registers loaded for MC9S12DG256 from D:\Program Files\Freescale\CodeWarrior for HCS12 V4.7\prog\REG\MCU03D9.REG
executing .\cmd\P&E_Multilink_CyclonePro_startup.cmd
!// At startup the commands written below will be executed
Target Ready
!
done .\cmd\P&E_Multilink_CyclonePro_startup.cmd
Startup command file correctly executed.
executing P&E_Multilink_CyclonePro.hwc
done P&E_Multilink_CyclonePro.hwc
executing .\cmd\P&E_Multilink_CyclonePro_preload.cmd
!// Before load the commands written below will be executed
Target Ready
done .\cmd\P&E_Multilink_CyclonePro_preload.cmd
Preload command file correctly executed.
FP: FLASH parameters loaded for MC9S12DG256B_V11(NVMIF2 rev 2,3,3,3,2) from D:\Program Files\Freescale\CodeWarrior for HCS12 V4.7\prog\FPP\mcu03D9.fpp
executing .\cmd\P&E_Multilink_CyclonePro_reset.cmd
!// After reset the commands written below will be executed
done .\cmd\P&E_Multilink_CyclonePro_reset.cmd
Reset command file correctly executed.
FP: FLASH parameters loaded for MC9S12DG256B_V11(NVMIF2 rev 2,3,3,3,2) from D:\Program Files\Freescale\CodeWarrior for HCS12 V4.7\prog\FPP\mcu03D9.fpp
Block Module Name      Address Range   Status
   0  EEPROM             400 -   FFF   Programmed - Unselected
   1  FLASH_4000        4000 -  7FFF   Programmed - Unselected
   2  FLASH_C000        C000 -  FFFF   Programmed - Unselected
   3  ALL_PPAGES      308000 -3FBFFF   Programmed - Unselected
   4  FLAT8000_P30      8000 -  BFFF   Programmed - Unselected
FP: The UNPROTECT command is not available for the EEPROM flash module => Skipped.
FP: The UNPROTECT command is not available for the FLASH_4000 flash module => Skipped.
FP: The UNPROTECT command is not available for the FLASH_C000 flash module => Skipped.
FP: The UNPROTECT command is not available for the ALL_PPAGES flash module => Skipped.
FP: The UNPROTECT command is not available for the FLAT8000_P30 flash module => Skipped.
executing .\cmd\P&E_Multilink_CyclonePro_vppon.cmd
!// Before programming the flash, the commands written below will be executed
done .\cmd\P&E_Multilink_CyclonePro_vppon.cmd
Vppon command file correctly executed.
<Timeout> (> 10000 ms)
Program counter: 0x0030B399
FP: Operation failed on EEPROM flash module.
FP: FLASH_C000 flash module is bad or protected.
FP: ALL_PPAGES flash module is bad or protected.
executing .\cmd\P&E_Multilink_CyclonePro_vppoff.cmd
!// After programming the flash, the commands written below will be executed
done .\cmd\P&E_Multilink_CyclonePro_vppoff.cmd
Vppoff command file correctly executed.
FP: Arm FLASH for loading.
executing .\cmd\P&E_Multilink_CyclonePro_vppon.cmd
!// Before programming the flash, the commands written below will be executed
done .\cmd\P&E_Multilink_CyclonePro_vppon.cmd
Vppon command file correctly executed.
FP: FLASH_C000 flash module is bad or protected.
FP: FLASH_C000 flash module is bad or protected.
executing .\cmd\P&E_Multilink_CyclonePro_vppoff.cmd
!// After programming the flash, the commands written below will be executed
done .\cmd\P&E_Multilink_CyclonePro_vppoff.cmd
Vppoff command file correctly executed.
FP: FLASH disarmed.
executing .\cmd\P&E_Multilink_CyclonePro_reset.cmd
!// After reset the commands written below will be executed
done .\cmd\P&E_Multilink_CyclonePro_reset.cmd
Reset command file correctly executed.
executing .\cmd\P&E_Multilink_CyclonePro_postload.cmd
!// After load the commands written below will be executed
RESET
done .\cmd\P&E_Multilink_CyclonePro_postload.cmd
Postload command file correctly executed.
in>
 
Labels (1)
0 Kudos
Reply
3 Replies

933 Views
Destinio
Contributor I
Really appreciate your help. kef.
0 Kudos
Reply

933 Views
Destinio
Contributor I
I got it, it make me so excited.
 
The problem is caused by the reset chip MAX809
 
When the debugger program the FLASH and EEPROM,
 
the voltage of the RESET pin will go below the threshold voltage
 
of the MAX809 because of certain reason(s), which makes MAX809 reset MCU.
 
so the program to the FLASH and EEPROM can't complete successfully,
 
and the debug can't go fluently.
0 Kudos
Reply

933 Views
kef
Specialist I
Please note that MAX809 has push-pull output, which should be NOT directly connected to bidirectional S12/S12X /RESET pin! You should use open-drain reset chip or put current limiting resistor between MAX809 output and MCU /RESET.
0 Kudos
Reply