2023-10-05 06:33 AM - edited 2023-10-05 07:19 AM
Hi! i have two stm8105c6t6 , i want use one to master and other to slave, two pcb board are connect using 10k pull up resistor in the SDA/SCL line. i am using the example AN3281 stm, but my microcontroller not have tim4, i change the tim4 to tim3 but when i compile the code have the error " not handle interrupt tim3", do you know because this ocurr?
This is the error: "
Running Linker
clnk -m Debug\i2c_master_poll.map -lC:\Lib -o Debug\i2c_master_poll.sm8 Debug\i2c_master_poll.lkf
#error clnk Debug\i2c_master_poll.lkf:1 symbol _TIM2_tout not defined (Debug\i2c_master_poll.o Debug\main.o )
#error clnk Debug\i2c_master_poll.lkf:1 symbol f_TIM4InterruptHandle not defined (Debug\stm8_interrupt_vector.o )
The command: "clnk -m Debug\i2c_master_poll.map -lC:\Lib -o Debug\i2c_master_poll.sm8 Debug\i2c_master_poll.lkf " has failed, the returned value is: 1
exit code=1.
TIM4InterruptHandle not defined, but i change tim4 to tim2, and change TIM2InterruptHandle.
"
2023-10-06 04:40 AM
STM8S105C6T6, the MCU present in STM8S-DISCOVERY board have TIM4 and also TIM1, TIM2, TIM3.
Maybe you are using the wrong include header file.