apache / nuttx

Apache NuttX is a mature, real-time embedded operating system (RTOS)
https://nuttx.apache.org/
Apache License 2.0
2.74k stars 1.14k forks source link

mcp2515 Interrupt handler shouldn't lock spi bus #9826

Open paolovolpi opened 1 year ago

paolovolpi commented 1 year ago

In complex environments, we cannot do SPI transfers from the interrupt handler because semaphores are probably used to lock the SPI bus. We need to use a Work queue as done for example in the enc28j60 driver (/drivers/net/enc28j60.c)

acassis commented 1 year ago

Hi @paolovolpi good finding! Could you please contribute a patch to fix it? @vbenso it could also be related to issue you was facing!