And when debugging I get the following:
Using Spi_SetConfigInt:
‘Command’ ‘Before’ - ‘After’
Mode: 0 - 0
ioCLK: 1048631 - 4294967295
ioMOSI: 1048632 - 4294967295
ioMISO: 1048633 - 4294967295
ioCS: 1048634 - 4294967295
BtRateHz: 1000000 - 1000000
BitsPerWord: 32 - 32
Using Spi_SetConfigString:
‘Command’ ‘Before’ - ‘After’
Mode: 0 - 0
ioCLK: 1048631 - 1048631
ioMOSI: 1048632 - 1048632
ioMISO: 1048633 - 1048633
ioCS: 1048634 - 1048634
BtRateHz: 1000000 - 1000000
BitsPerWord: 32 - 32
I did this as follows:
Spi_GetConfigInt(hSPI, L"SpiMode", &test);
Spi_GetConfigInt(hSPI, L"ioClk", &test);
Spi_GetConfigInt(hSPI, L"ioMOSI", &test);
Spi_GetConfigInt(hSPI, L"ioMISO", &test);
Spi_GetConfigInt(hSPI, L"ioCS", &test);
Spi_GetConfigInt(hSPI, L"BitRateHz", &test); ///< Set SPI clock speed
Spi_GetConfigInt(hSPI, L"BitsPerWord", &test);
/*success &= Spi_SetConfigString(hSPI, L"SpiMode", L"0", StoreToRegistry);
success &= Spi_SetConfigString(hSPI, L"ioClk", L"235", StoreToRegistry);
success &= Spi_SetConfigString(hSPI, L"ioMOSI", L"231", StoreToRegistry);
success &= Spi_SetConfigString(hSPI, L"ioMISO", L"229", StoreToRegistry);
success &= Spi_SetConfigString(hSPI, L"ioCS", L"233", StoreToRegistry);
success &= Spi_SetConfigString(hSPI, L"BitRateHz", L"100000", StoreToRegistry); ///< Set SPI clock speed
success &= Spi_SetConfigString(hSPI, L"BitsPerWord", L"32", StoreToRegistry);*/
//Use Spi_SetConfigInt results in no error but there is NO output visible
/*success &= Spi_SetConfigInt(hSPI, L"SpiMode", 0, StoreToRegistry);
success &= Spi_SetConfigInt(hSPI, L"ioClk", 235, StoreToRegistry);
success &= Spi_SetConfigInt(hSPI, L"ioMOSI", 231, StoreToRegistry);
success &= Spi_SetConfigInt(hSPI, L"ioMISO", 229, StoreToRegistry);
success &= Spi_SetConfigInt(hSPI, L"ioCS", 233, StoreToRegistry);
success &= Spi_SetConfigInt(hSPI, L"BitRateHz", 100000, StoreToRegistry);
success &= Spi_SetConfigInt(hSPI, L"BitsPerWord", 32, StoreToRegistry);*/
Spi_GetConfigInt(hSPI, L"SpiMode", &test);
Spi_GetConfigInt(hSPI, L"ioClk", &test);
Spi_GetConfigInt(hSPI, L"ioMOSI", &test);
Spi_GetConfigInt(hSPI, L"ioMISO", &test);
Spi_GetConfigInt(hSPI, L"ioCS", &test);
Spi_GetConfigInt(hSPI, L"BitRateHz", &test); ///< Set SPI clock speed
Spi_GetConfigInt(hSPI, L"BitsPerWord", &test);
Atleast Spi_SetConfigString leaves the values intact. I think is the reason why the function works.
Spi_SetConfigInt will mess up the values. I think this causes that I dont see any output.