Hi hanzibal,
Well, this is all related to getting the CC3000 to work. I now have 5 CC3000 modules. four of them will not work with Valkyrie-MT's code; one works sometimes. The failure is always with Simple-Link start. The CC3000 is very picky about SPI so I decided to go through the First Host SPI Write Operation myself. http://processors.wiki.ti.com/index.php/CC3000_Serial_Port_Interface_(SPI)
However, the point here is that I have the Netduino configured as SPI mode 1 and the Saleae configured to receive mode 1, but Netduino Plus 2 is not outputting mode 1 initially. Saleae is sampling high upon start and rejecting it as invalid mode 1. It idles low after deasserting CS.
Public Sub New(CSPin As OutputPort, EnPin As OutputPort, Intpin As InterruptPort) 'Setup for SPI Mode 1; Set SPI Configuration vars '================================================ Dim ChipSelect As Microsoft.SPOT.Hardware.Cpu.Pin = DirectCast(-1, Cpu.Pin) Dim chip_select_state As Boolean = False 'active low Dim chip_select_setuptime As UInteger = 0 Dim chip_select_holdtime As UInteger = 0 Dim clock_idle_state As Boolean = False 'low Dim clock_edge As Boolean = False 'trailing edge Dim clock_rate As UInteger = 400 '400kHz Dim SPI_module As SPI.SPI_module = Spi.SPI_module.SPI1 Dim SetSPI As New SPI.Configuration(ChipSelect, chip_select_state, chip_select_setuptime, chip_select_holdtime, clock_idle_state, clock_edge, clock_rate, SPI_module) Me.Spi = New SPI(SetSPI) CS = CSPin VBAT_Enable = EnPin IRQ = Intpin 'handler to process IRQ line active low AddHandler IRQ.OnInterrupt, AddressOf CC3000IRQ CS.Write(True) IRQ.EnableInterrupt() F_interrupts_enabled = True End Sub
Perhaps I am missing some setting. I tried chip select hold/setup time = nonzero --> no effect and power cycling --> no effect.