SPI Multithreading exception


i have been trying to write on the Spi using the toradex library. I have been using it with success, but when i started to let it run on a thread i got a Data Abort exception. I am pretty sure that this is my fault, but I havn’t been able to find out what is wrong. The program is written in VB.net with .net cf 3.5

The error i get when the thread tries to write is:

ExceptionCode: 0x0000005
ExceptionAddress: 0x42e619b8
Faulting module: tdxlibrariesdll.dll
Offset: 0x000319b8
 at spi_teg.TegSpi_ReadWrite(Int32[] txData,Int32[]& rxData,Int32 numberofFrames)

From the debugger over serial:

Exception 'Data Abort' (0x4): Thread-Id=066801fa(pth=a293d9c0), Proc-Id=066301ce(pprc=a291b1bc) 'MCPTest.exe', VM-active=066301ce(pprc=a291b1bc) 'MCPTest.exe'
PC=42e619b8(tdxalllibrariesdll.dll+0x000319b8) RA=0000000a(???+0x0000000a) SP=00e9fa84, BVA=00000008

Best Regards


Dear @LangF,

Could you please test the same with this library release and let us know if you are facing the same here.

I have tested this library with native code and multi-threaded application, it works. If it doesn’t the solve, Could you please share the sample code. It will help us to reproduce the issue and find the solution soon.