@@ -47,19 +47,59 @@ muss entsprechend angepasst werden. Am Ende hochladen:
4747 stm8flash -c stlinkv2 -p stm8s103?3 -w blinky.ihx
4848
4949
50- ## Infos und Application Notes
50+ ## current status and todo list
51+
52+ tested and working:
53+ pinMode()
54+
55+ implemented and partly working:
56+ digitalWrite(): simple write ok, PWM handling untested
57+
58+ tested, but not working:
59+ delay (probl. the timer4 initialisation)
60+
61+ not tested
62+ all time functions
63+ ShiftIn()
64+ ShiftOut()
65+
66+
67+ not implemented:
68+ yield()
69+ analogRead
70+ analogWrite
71+ HardwareSerial
72+ SPI
73+
74+
75+ ## Differences to the original Arduino environment
76+
77+ Additinal output pin modes:
78+ OUTPUT outpur, push-pull, slow mode (default)
79+ OUTPUT_OD output, open drain, fast mode
80+ OUTPUT_FAST output, push-pull, fast mode
81+ OUTPUT_OD_FAST output, open drain, fast mode
82+
83+ Timer: millis() uses timer4.
84+
85+
86+
87+ ## Further reading and application notes
5188
5289STM8AF Flash programming manual (PM0051)
5390STM8 SWIM protocol and debug manual (UM0470)
5491
55- RS-232-Beispiel :
92+ example for RS-232 handling with SPL :
5693https://sourceforge.net/p/oggstreamer/oggs-stm8-firmware-001/ci/master/tree/rx_ringbuffer.c
5794
5895
96+
5997### Anmerkungen zu SDCC
6098
6199Befehl '_ _ critical{..}' sollte eigentlich den vorherigen Interrupt-Zustand
62100wiederherstellen, es wird aber einfach ein festes Paar sim/rim produziert.
101+ Mit "push cc; sim" und "pop cc" klappt es im Simulator, aber nicht in der
102+ Realität.
63103
64104Für jeden benutzten Interrupt __ muss__ ein Prototyp in der Datei stehen, in
65105der auch main() definiert ist. Aber für jeden Prototypen, für den es keine
@@ -178,7 +218,7 @@ generell freigegeben werden, also hier:
178218 UART1_ITConfig(UART1_IT_TXE, ENABLE);
179219 enableInterrupts();
180220
181- Unklar ist, was die ITC-Priritäten bewirken. Es geht jedenfalls auch ohne:
221+ Unklar ist, was die ITC-Prioritäten bewirken. Es geht jedenfalls auch ohne:
182222
183223 ITC_DeInit();
184224 ITC_SetSoftwarePriority(ITC_IRQ_UART1_TX, ITC_PRIORITYLEVEL_2);
0 commit comments