Dear Sir
I'm working on the Compulab CM-T335 (TI AM3354) module using WEC7 and the Adeneo BSP
When I run the following C++ code for SPI1 the handle hSPI returns INVALID_HANDLE_VALUE.
If I then call GetLastError() I get 55 = ERROR_DEV_NOT_EXIST55 (0x37) = The specified network resource or device is no longer available.
hSPI = CreateFile(_T("SPI1:"), GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, NULL, 0);
//hSPI = CreateFile(_T("GIO1:"), GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, NULL, 0);
if (hSPI == INVALID_HANDLE_VALUE)
{
errorCode = GetLastError();
}
if (hSPI != NULL)
{
CloseHandle(hSPI);
}
If I call the GIO1 version of this code instead hSPI is a valid handle.
Checking the Registry HKEY_LOCAL_MACHINE\Drivers\builtin contains SPI1 and SPI2 with am33x_mcspi.dll
When I check HKEY_LOCAL_MACHINE\Drivers\Active there is no sign in the 65 entries of SPI1 or SPI2 being loaded. It does not appear in Windows Remote Process Viewer either
am33x_mcspi.dll is included in the Flat Release directory for OS and appears in the Windows directory on the Dev Board.
Can you think of any reason why SPI1 and SPI2 do not appear in HKEY\Drivers\Active (which is why I presume CreateFile() fails)
Cheers
Terry