Replies: 3 comments 1 reply
-
cc @tbursztyka |
Beta Was this translation helpful? Give feedback.
0 replies
-
I am also seeing this issue. Does the SPI drivers being written this way mean no meaningful work can be done in an ISR for a SPI peripheral; as generally this means accessing registers via SPI bus. Must all such processing be farmed off to a worker thread where one can perform SPI transactions? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Oh my gosh, Please implement some warning, or just make it working 😄 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
zephyr/drivers/spi/spi_context.h
Line 82 in 5a39a73
I have issue with my application, where I would like to start (by using DMA) SPI transaction from interrupt (precious timing us).
When I wanted to run it, program always finished here (
z_impl_k_sem_take()
):__ASSERT(((arch_is_in_isr() == false) || K_TIMEOUT_EQ(timeout, K_NO_WAIT)), "");
Due to the fact that "The kernel does allow an ISR to take a semaphore, however the ISR must not attempt to wait if the semaphore is unavailable" this SPI driver cannot work.
My workaround is in spi_context_lock() to change
//k_sem_take(&ctx->lock, K_FOREVER);
tok_sem_take(&ctx->lock, K_NO_WAIT);
But from system point of view, we have to get option to use it as a blocking or not.....
Or, should I write my application differently? I need to read out data from SPI periodically and preciously (4kHz => 250 us).
Beta Was this translation helpful? Give feedback.
All reactions