> The only clue I have is that g_inode_sem.holder is set to -1, which intuitively seems wrong to me, but this is way beyond me at this time of my NuttX journey!
The value -1 is not an error. It means that one thread is waiting to take a count from the semaphore. The value of the semaphore was 0 when that thread called sem_wait() (meaning that no counts are available). The count is decremented to -1 while the thread is suspended waiting for a count. So this sound like the thread is waiting for an event that never occurs. On Wed, Sep 14, 2022 at 11:23 AM TimH <t...@jti.uk.com.invalid> wrote: > Trying to get the touchscreen on my board registered and tested. It *seems* > to register, and at one random point the touchscreen example app did report > something that looked useful but I now cannot make any sense of it. > > > > The ADC itself is registered and the ADC example app works fine, but when I > try and open the TS device (/dev/input0) it hangs in inode_semtake when the > call to nxsem_wait_uninterruptible is called. > > > > The only clue I have is that g_inode_sem.holder is set to -1, which > intuitively seems wrong to me, but this is way beyond me at this time of my > NuttX journey! > > > > Otherwise I'm suspecting a problem/mismatch with structs perhaps from the > need to cast (think that's what it's called?) the adc_dev_s struct > > > > ret = sam_tsd_register( (struct sam_adc_s *) adc, 0) > > > > Any suggestions very welcome, as always :) > >