Tripped Up On an S08SH

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Tripped Up On an S08SH

1,007 次查看
admin
Specialist II

I was about to post a question here when I finally realized the error of my ways, so I thought I'd post anyway in case someone takes the same path as me.

 

I'm converting some software from a QG8 to an SH8. I looked carefully at the ICS diagrams and the ICS registers. Yep, the same thing, so that part should be pretty much a copy & paste.

 

Uhhh, no. The DCO on an SH runs twice as fast as the DCO on a QG, and therefore the bus clock is 2x that of a QG. Two clues that I missed: 1. The DCO runs at 1024 times the reference clock vs 512 on the QG, and 2. max bus frequency spec on an SH is 20MHz vs 10MHz on a QG.

 

The simple fix is to keep BDIV at divide-by-2 and not change it to divide-by-1 like I was doing on the QG.

 

Think I've missed anything else? 

标签 (1)
0 项奖励
回复
1 回复

666 次查看
bigmac
Specialist III

Hello,

 

Another difference between the two MCU to keep in mind. The COP reset mechanism for the S08SH (and other more recent devices) requires that the specific sequence 0x55, 0xAA be written to the SRS register, whereas for the 'QG8 any single value could be written to SRS register.

 

This should already be taken care of with C programming macro, but might not be with assembly programming. 

 

Regards,

Mac

 

Message Edited by bigmac on 2010-02-16 05:30 AM
0 项奖励
回复