Trying release SPI bus mutex in callback procedure
Posted: Sun Jan 15, 2012 12:59 am
Dear Giovanni,
it seems that the mutex - usually used to control the access on a SPI channel device - is controlled by thread or kernel context.
I try to use the callback function to cleanup the use of the SPI device. Unfortunately the release of the controlled mutex (spiReleaseBus(&SPID2))
seems not to work calling from callback procedure due to it is in fact a interrupt routine.
It seems that the handle of this mutex is controlled by thread or kernel context - not by the SPI-Device context. However - is it possible to program this for the future ?
It is much complicated to set up other signaling mechanisms to signal the origin calling thread to wake up only to do the "release SPI - channel task" ?
The SPI channel are typically used to do much of things in background, signaling the end of operation in calling the callback function.
In my opinion its logical to allow the release of this device in the callback function too - isn't it ? (maybe you intend to do so and this is a misfunction ?)
with kind regards,
Thilo
it seems that the mutex - usually used to control the access on a SPI channel device - is controlled by thread or kernel context.
I try to use the callback function to cleanup the use of the SPI device. Unfortunately the release of the controlled mutex (spiReleaseBus(&SPID2))
seems not to work calling from callback procedure due to it is in fact a interrupt routine.
It seems that the handle of this mutex is controlled by thread or kernel context - not by the SPI-Device context. However - is it possible to program this for the future ?
It is much complicated to set up other signaling mechanisms to signal the origin calling thread to wake up only to do the "release SPI - channel task" ?
The SPI channel are typically used to do much of things in background, signaling the end of operation in calling the callback function.
In my opinion its logical to allow the release of this device in the callback function too - isn't it ? (maybe you intend to do so and this is a misfunction ?)
with kind regards,
Thilo