Trimming The HCS08SH8 ICS To Non-Standard Frequencies Using a P&E USB Multilink

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Trimming The HCS08SH8 ICS To Non-Standard Frequencies Using a P&E USB Multilink

1,596件の閲覧回数
davidboyd
Contributor I

I've always used the default internal reference frequency trim values when using the ICS (31,250Hz) and ICG (243,000Hz) on HSC08 processors.  However I have a need to trim the ICS on a SH8 to a specific value (38,000) so that I can generate some accurate high frequency baud rates on the SCI.

 

The SH8 spec sheet says I can trim from 31,250 to 39,062.5Hz, so my value of 38,000 Hz is within range, to generate a bus clock of 19,450,000 and a baud rate of 64,000 with an SCI modulo divisor of 19.

 

I am using a P&E USB Multilink Interface.  P&E tell me that I can use the Multilink to generate customised TRIM values by using the PROGHCS08 software and specifying a specific bus frequency, however I have not been able to work out how to do this. Has anyone done this?

 

thanks for your help in advance

 

David

ラベル(1)
タグ(4)
0 件の賞賛
返信
5 返答(返信)

1,206件の閲覧回数
bigmac
Specialist III

Hello David,

I had a similar problem some time ago, where I required a custom trim frequency, in conjunction with using P&E PROGHCS08 software for programming (as opposed to using CW).  The technical support that I received from P&E revealed that earlier versions of the software (which applied to me) did not directly support custom trim frequencies, but that it was possible to manually alter the .S08P algorithm file to provide the required trimmed bus frequency.

Open up the algorithm file applicable to the SH8 device within a text editor, and I would expect that you would have the following line at about line 10:

09BIT_TRIM=004A/004B/01/FFAF/FFAE/001E8480/

The hexadecimal value 001E8480 is the one of interest.  When converted to a decimal number and multiplied by 8, this represents the bus frequency in Hz - 16 MHz in this case.

For a bus frequency of 19.456 MHz, the trim value would need to be altered to 00251C00 hexadecimal.

Regards,

Mac

1,206件の閲覧回数
davidboyd
Contributor I

Hi Mac,

Thanks for the reply. I will test this during the week.

This solution of course assumes BDIV=1 and RDIV=1, which they will in most cases.

I was always curious why they specify a maximum 20MHz bus frequency but the software demos only supported 16MHz with a 31.250kHz internal oscillator value.

I also want to achieve the same outcome with an S08AC128 processor, but I noticed they don't have the 09BIT_TRIM parameter in the configuration file.

Thanks again.

David


0 件の賞賛
返信

1,206件の閲覧回数
bigmac
Specialist III

Hello David,

The trim value within the programming algorithm can be alternatively viewed as 64 times the reference frequency - this is probably a less ambiguous way of specifying the value.

For the 'AC128 device, this uses an ICG module, rather than the ICS module.  I notice that the following line appears in the programming algorithm file -

HCS08_TRIM=004E/FFBE/00076A70/

Working backwards, the hexadecimal value 00076A70 is 486000 decimal.  Since the nominal internal reference frequency is 243 kHz, it would seem that the number represents twice the required reference frequency in Hz.  Something else for you to try.

Regards,

Mac

0 件の賞賛
返信

1,206件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

you can set trim value in PEMICRO Connection Manager before launch debugger, see attached

0 件の賞賛
返信

1,206件の閲覧回数
davidboyd
Contributor I

Hi,

Thanks for your reply.

I must have a different or older version of the PROG software.

See the attached image.  I don't have those options.  I'm running 1.67.00.00. What version is yours?

PE Micro TRIM.JPG

0 件の賞賛
返信