This document provides a firmware example (STSW-STM8077), showing a way to calibrate the STM8AF or STM8S high-speed internal oscillator (HSI), when the STM8 is used as a LIN bus slave node. The LINUART automatic resynchronization feature allows to compensate any possible HSI frequency deviation. It allows to maintain the LIN communication on the complete voltage and temperature range. On top of that, this example shows how to calibrate the HSI, thanks to the value updated by the automatic resynchronization in the LINUART baudrate registers.
HSI calibration from the LIN frame sync field
HSI calibrated after few frames received
HSI frequency maintained in spite of temperature and voltage variation
Your newsletter subscription has been successfully submitted!
To validate your subscription, please click on the link inside the email that has been sent to you. This link will be valid for 24 hours. Please check your spam filters in case you did not receive the email.