我没有测试你的代码,但是如果它适用于PD5(引脚8)那么它也适用于PA3(引脚5)。但是,我不会在没有重新映射引脚的情况下使用你的代码,或者至少在端口初始化之前添加1s延迟(抛弃完美的芯片可能会令人沮丧)。
您是否忘记设置选项位(OPT2位0:1至0x11)?
我测试了用例
https://github.com/TG9541/stm8ef/releases/download/2.2.20/stm8ef-bin.zip
对我来说,重新映射到PA3(引脚5)的工作原理如数据表中所述。使用eForth控制台和e4thcom设置选项字节的工作方式如下:
#require OPT!
res MCU:STM8S103
res export OPT2
3 OPT2 OPT!
以上来自于谷歌翻译
以下为原文
I didn't test your code, but if it works with PD5 (pin 8) then it should also work with PA3 (pin 5). However, I wouldn't use your code without remapping the pin, or at least adding a 1s delay before the port initialization (throwing away perfectly good chips can be frustrating).
Did you maybe forget to set the option bits (OPT2 bits 0:1 to 0x11)?
I tested the use case with the
https://github.com/TG9541/stm8ef/releases/download/2.2.20/stm8ef-bin.zip
For me the remapping to PA3 (pin 5) works as described in the datasheet.Using the eForth console and e4thcom setting the option bytes works like this:
#require OPT!
res MCU: STM8S103
res export OPT2
3 OPT2 OPT!
我没有测试你的代码,但是如果它适用于PD5(引脚8)那么它也适用于PA3(引脚5)。但是,我不会在没有重新映射引脚的情况下使用你的代码,或者至少在端口初始化之前添加1s延迟(抛弃完美的芯片可能会令人沮丧)。
您是否忘记设置选项位(OPT2位0:1至0x11)?
我测试了用例
https://github.com/TG9541/stm8ef/releases/download/2.2.20/stm8ef-bin.zip
对我来说,重新映射到PA3(引脚5)的工作原理如数据表中所述。使用eForth控制台和e4thcom设置选项字节的工作方式如下:
#require OPT!
res MCU:STM8S103
res export OPT2
3 OPT2 OPT!
以上来自于谷歌翻译
以下为原文
I didn't test your code, but if it works with PD5 (pin 8) then it should also work with PA3 (pin 5). However, I wouldn't use your code without remapping the pin, or at least adding a 1s delay before the port initialization (throwing away perfectly good chips can be frustrating).
Did you maybe forget to set the option bits (OPT2 bits 0:1 to 0x11)?
I tested the use case with the
https://github.com/TG9541/stm8ef/releases/download/2.2.20/stm8ef-bin.zip
For me the remapping to PA3 (pin 5) works as described in the datasheet.Using the eForth console and e4thcom setting the option bytes works like this:
#require OPT!
res MCU: STM8S103
res export OPT2
3 OPT2 OPT!
举报