We are using STM32F103C8T6 microcontroller for handling digital I/O, RS 485 communication.
For this application is it OK if internal RC oscilattor is used (Frequency = 8 MHz).
Or external crystal / resonator is required for this application (data rate = 500kbps).
Pls let me know.
For communication, you need precise clock source, so you need to use an external crystal! Internal clock source are not precise enough to get spot on clock source as far as I know!
The way to determine this for yourself is to look at the data sheet for that MCU. In Table 24 it shows that the HSI frequency stability under 'normal' conditions is -1.1% to +1.8% but can be up to -2% to 2.5% under extreme temperature conditions.
Typically UARTs need to have the system clock frequency stable to less than 2% for reliable sending and receiving.
Therefore to probably will be OK with the HSI unless you are trying to use this under something other than normal room temperatures.
If this is for a hobby project or something where occasional signal errors can be tolerated (i.e. there is a CRC and re-send style of protocol used) then use the HSI.
However it is probably better to use a crystal if you can.
Susan