AnsweredAssumed Answered

STM8S HSI Calibration errors

Question asked by Roy Sutton on Sep 21, 2017
Latest reply on Sep 22, 2017 by Thomas G

\ Trying to trim HSI I get 3 identical lowest frequencies verified on scope

\ eForth on STM8S103F running MINDEV

\ GitHub - TG9541/stm8ef: eForth for STM8S Value Line and Access Line devices

\ forum.hobbycomponents.com - View topic - STM8S103F3 Development Board (HCDVBD0034)

\  my contrib under user barewires

\ initTIM1 and content from previous page 1

\ 1st try trim freq and confirm register readback at 4 kHz

\
FILE
NVM
: CLK_HSITRIMR $50CC ;
: f3 3 CLK_HSITRIMR C! CLK_HSITRIMR C@ . ; \ 3.999 lowest freq ?
: f2 2 CLK_HSITRIMR C! CLK_HSITRIMR C@ . ; \ 3.999 ?
: f1 1 CLK_HSITRIMR C! CLK_HSITRIMR C@ . ; \ 3.999 ?
: f0 0 CLK_HSITRIMR C! CLK_HSITRIMR C@ . ; \ 4.04 kHz reset value
: f7 7 CLK_HSITRIMR C! CLK_HSITRIMR C@ . ; \ 4.087
: f6 6 CLK_HSITRIMR C! CLK_HSITRIMR C@ . ; \ 4.123
: f5 5 CLK_HSITRIMR C! CLK_HSITRIMR C@ . ; \ 4.18
: f4 4 CLK_HSITRIMR C! CLK_HSITRIMR C@ . ; \ 4.229 highest freq
RAM
HAND
initTIM1
4000 Hz
f3 3 ok

Outcomes