Skip to content

stuck in k_sem_take #92782

Answered by ldomaigne
paladahallin asked this question in Q&A
Discussion options

You must be logged in to vote

Eh,eh,eh Aurix platform...

I’m working on adding a new ADC driver and running into an issue with adc_context_lock in the ADC read function.

What kind of issue are you facing exactly? You block in the spinlock?

Could someone please help me understand the correct sequence for using adc_context_lock in a custom ADC driver? Are there any common pitfalls or best practices I should follow to avoid this error?

AFAICS, you just lock the adc context before the read operation, and release it after completion. There are many examples of ADC drivers available under zephyr/drivers/adc

One thing that comes to mind: have you properly initialized the context? You can either call adc_context_init() in…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by paladahallin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants