You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SpiDevice dispose blocks the execution and is never disposing
How to reproduce
// Frequency is 38KHz in the protocol
float t_carrier = 1 / 38.0f;
// Reality is that there is a 2us difference in the output as there is always a 2us bit on on SPI using MOSI
float t_ushort = t_carrier - 2e-3f;
// Calulate the outpout frenquency. Here = 16/(1/38 -2^-3) = 658KHz
int freq = (int)(16.0f * 1000 / t_ushort);
Configuration.SetPinFunction(4, DeviceFunction.SPI1_CLOCK);
Configuration.SetPinFunction(5, DeviceFunction.SPI1_MISO);
Configuration.SetPinFunction(6, DeviceFunction.SPI1_MOSI);
var settings = new SpiConnectionSettings(1, -1)
{
ClockFrequency = freq,
Mode = SpiMode.Mode3,
ChipSelectLineActiveState = PinValue.High,
};
_spi = new SpiDevice(settings);
Thread.Sleep(1000);
_spi.Dispose();
// This is then never ever executed!
_spi = new SpiDevice(settings);
Thread.Sleep(1000);
_spi.Dispose();
Thread.Sleep(Timeout.Infinite);
Expected behaviour
SpiDevice should properly dispose
Screenshots
No response
Sample project or code
No response
Aditional information
No response
The text was updated successfully, but these errors were encountered:
I've been trying on different ESP32-C3 models and they all have the same issue. There is no problem for a normal ESP32. So it seems related specifically to ESP32-C3.
Library/API/IoT binding
System.Device.Spi
Visual Studio version
No response
.NET nanoFramework extension version
No response
Target name(s)
XIAO_ESP32C3
Firmware version
latest
Device capabilities
No response
Description
SpiDevice dispose blocks the execution and is never disposing
How to reproduce
// This is then never ever executed!
_spi = new SpiDevice(settings);
Thread.Sleep(1000);
_spi.Dispose();
Thread.Sleep(Timeout.Infinite);
Expected behaviour
SpiDevice should properly dispose
Screenshots
No response
Sample project or code
No response
Aditional information
No response
The text was updated successfully, but these errors were encountered: