Hello,
I have a working code (.S19 file -SH32 ) and tried to program it with the flash programmer under CW 10.6 . Before we used CW 6.3 (classical) and we had no problem. We used the hiwave.exe debugger.If I use the "flash to target" under 10.6 all seems to be ok. But there seems to be a problem with the baudrate of the serial port of the MCU(1200bd). I get only garbled characters back. It looks like there is something wrong with the MCU clock. I tried version 10.3,10.4, 10.6 with the same results. There is no problem flashing the .s19 file with "hiwave.exe" of CW 6.3.
Programming adapter used " P&E Multilink Universal"
Here is log file under 10.6
fl::target -lc "LC for Simple Flash"
fl::target -b 0x80 0x400
fl::target -v off -l off
cmdwin::fl::device -d "MC9S08SH32_FLASH" -o "32kx16x1" -a 0x8000 0xffff
cmdwin::fl::image -f "C:\\Users\\walter\\Downloads\\treg232\\treg232.s19" -t "Auto Detect" -re on -r 0x8000 0xffff -oe off
cmdwin::fl::erase image
Beginning Operation ...
-------------------------
Auto-detection is successful.
File is of type Motorola S-Record Format.
Performing target initialization ...
Device MC9S08SH32_FLASH
Detect frequence ...
Frequence 7980.27 Khz
Erasing ..............
Erase Command Succeeded.
Device MC9S08SH32_FLASH
cmdwin::fl::write
-------------------------
Flash Operation. ...
Auto-detection is successful.
File is of type Motorola S-Record Format.
Device MC9S08SH32_FLASH
Programming ...................
Device MC9S08SH32_FLASH
Program Command Succeeded
Flash Operation. done
Any idea ?
Regards
Walter
Hello Walter,
I assume you use the internal clock source. I suspect the problem could be related to internal clock trim registers (ICSTRM - TRIM and ICSSC - FTRIM).
NVTRIM, NVFTRIM includes factory or custom trim values in Flash - these are copied into TRIM/FTRIM after reset.
I guess that hiwave.exe debugger does trimming while loading the s-record whereas Flash Programmer does not.
Can you possibly try to compare NVTRIM / NVFTRIM in cw 6.3 vs. CW 10.6?
Hope it helps.
Stan
Hello Stan,
Yes,we are using the internal clock. I think you are correct the hiwave.exe debugger does the trimming while loading the s-record and afterwards the baudrate is correct.
I will check NVTRIM/NVFTRIM. But how is it possible then to program a .s19 file(CW 6.3) under CW 10.x w/o transferring the whole project to 10.x if there is no trimming using the flash programmer (CW 10.x)? How is the trimming accomplished in 10.x?
Regards
Walter
Answer by Freescale Support:
"Thank you for contacting us about this issue.
This problem with the flash programmer not trimming the S08 devices was
already reported to our developers with internal ticket number
ENGR00278719. Unfortunately, they determined not to fix it due to other
product priorities. I am very sorry for this inconvenience. However this
issue is not present when programming the device using CodeWarrior debugger.
And as other alternatives, below you have some suggestions:
1) Using P&E PROGHCS08. This software is not for free, but it does not
have the problem about the trim value. In fact there is a dedicated
command for programming the trim:
http://www.pemicro.com/products/product_viewDetails.cfm?product_id=27
2) Using a Cyclone programmer. This tool can also program the trim at
production.
3) By means of hiwave. As you mentioned, the issue is not present with
this software tool.
I hope my response helps to clarify. If you still have doubts, please
let me know.
Have a nice day!"