STM8S103飞线外接芯片,I2C不能得到slaveAddress应答,通讯失败。
测试标签123
IAR FOR ARM和IAR FOR STM8无法共存,
STM8L052,液晶内部电源怎么用?
STM8S105C6T6 UART2串口,能接收数据,不能发送数据
STM8S105K4 串口2 无奇偶校验,也能接收 偶校验的 数据
在STM8S的IAP使用中断和APP使用中断问题
STM8L151 SMBUS设计
STM8S103F复位异常
STM8L的LCD调试时不亮
微信公众号
手机版
这是因为你在stm8s.h里没有加入宏定义或宏定义不是你的器件,
在stm8s.h里有这样几行,
#if !defined (STM8S208) && !defined (STM8S207) && !defined (STM8S105) && !defined (STM8S103) && !defined (STM8S903) && !defined (STM8AF52Ax) && !defined (STM8AF62Ax) && !defined (STM8AF626x)
#error "Please select first the target STM8S/A device used in your application (in stm8s.h file)"
#endif
在你编译时,如果没有以上宏定义,就会报这个错。
在stm8s.h里有一段选择器件的代码:
// #define STM8S207 /*!< STM8S High density devices without CAN */
/* #define STM8AF52Ax */ /*!< STM8A High density devices with CAN */
/* #define STM8AF62Ax */ /*!< STM8A High density devices without CAN */
/* #define STM8S105 */ /*!< STM8S Medium density devices */
/* #define STM8AF626x */ /*!< STM8A Medium density devices */
/* #define STM8S903 */ /*!< STM8S Low density devices */
你选的器件是STM8S Low density devices ,所以可以 把/* #define STM8S903 */的注释符去掉,或者自己定义 #define STM8S003
评分
查看全部评分
可以用哪个替代吗?