Skip to main content
This topic has been closed for replies.
Best answer by gbm

Whether it is good or wrong depends on the details of "processing". There is nothing wrong with doing everything only in ISRs and not having the "main loop" at all (putting the processor to sleep instead). There is no general rule for this.

4 replies

gbm
Super User
June 20, 2023

How could anyone help without seeing a single line of code? You can do the processing in an interrupt routine or in main. In both cases you may do it right or wrong.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
LOnGr.1
LOnGr.1Author
Associate III
June 20, 2023

I said that it was working fine in the interrupt, my question was about the idea of processing data in the interrupt handler, not the structure of processing. My discussion with the engineer made me think that its wrong to process the incoming data in the interrupt

waclawek.jan
Super User
June 20, 2023

Generally, ISRs should be kept as short as possible so that they interfere (delay execution) with other code (including other ISRs) as little as possible.

Individual exceptions may exist, but you should be able to argue about your design choices.

JW

gbm
gbmBest answer
Super User
June 20, 2023

Whether it is good or wrong depends on the details of "processing". There is nothing wrong with doing everything only in ISRs and not having the "main loop" at all (putting the processor to sleep instead). There is no general rule for this.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice