Skip to content

Commit

Permalink
FTx: Invert Data and direction position when setting up outputs for S…
Browse files Browse the repository at this point in the history
…PI mode (#2362)

The opcode specification says that data comes before direction. The current code prevents the clock pin from outputting the clock signal
  • Loading branch information
ProtectedVariable authored Dec 27, 2024
1 parent 37291f6 commit 9c6b628
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/devices/Ft232H/Ftx232HDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,8 @@ internal void SpiInitialize()
GpioLowDir = (byte)((GpioLowDir & MaskGpio) | 0x03);
// clock, MOSI and MISO to 0
GpioLowData = (byte)(GpioLowData & MaskGpio);
toSend[idx++] = GpioLowDir;
toSend[idx++] = GpioLowData;
toSend[idx++] = GpioLowDir;
// The SK clock frequency can be worked out by below algorithm with divide by 5 set as off
// TCK period = 60MHz / (( 1 + [ (0xValueH * 256) OR 0xValueL] ) * 2)
// Command to set clock divisor
Expand Down

0 comments on commit 9c6b628

Please sign in to comment.