Hi Mikael,
In my guide to FlashForth5 I have an example for interrupts. See page 28 of the guide FlashForth5.pfd in the attachement!
When I call the first time irq_init all seems to be ok. The second time I get something like
irq_init
1 ok<#,ram>
2
3
4
5
6 Interrupt abgestellt
Something does not work properly. It may be that I must insert ei and di in the appropriate places, or that I can not leave the int_routine at this way. Can you give me a hint? Thank you!
BR Radolf von Salis
You should not print anything from inside an interrupt routine. It will not work reliably.
Printing should be done from the operator task or from a background task if the backround task has a output device.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Mikael,
In my guide to FlashForth5 I have an example for interrupts. See page 28 of the guide FlashForth5.pfd in the attachement!
When I call the first time irq_init all seems to be ok. The second time I get something like
irq_init
1 ok<#,ram>
2
3
4
5
6 Interrupt abgestellt
Something does not work properly. It may be that I must insert ei and di in the appropriate places, or that I can not leave the int_routine at this way. Can you give me a hint? Thank you!
BR Radolf von Salis
You should not print anything from inside an interrupt routine. It will not work reliably.
Printing should be done from the operator task or from a background task if the backround task has a output device.
Thank you Mikael. It seems that with an interrupt routine also no data can be exchanged via data stack, but only via a variable.